Glass Fishv3.1 Whats New

7,413 views

Published on

This material explains the new feature of the GlassFish v3.1.

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
7,413
On SlideShare
0
From Embeds
0
Number of Embeds
4,810
Actions
Shares
0
Downloads
53
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Glass Fishv3.1 Whats New

  1. 1. Oracle Direct Seminar Insert Picture Here> GlassFish v3.1 Java
  2. 2. Agenda • •  Java EE 6•  Oracle GlassFish Server v3•  Oracle GlassFish Server v3 •  GlassFish v3.1•  Copyright© 2010, Oracle. All rights reserved.
  3. 3. Copyright© 2010, Oracle. All rights reserved.
  4. 4. 2011 2 28 Copyright© 2010, Oracle. All rights reserved.
  5. 5. GlassFish Java •  GlassFish •  OSS •  •  GlassFish •  ( ) http://glassfish.org •  •  /Wiki •  /ML GlassFish •  CDDL/GPLv2 Server•  GlassFish http://www.oracle.com •  GlassFish Server Open Source Edition ( ) •  Oracle GlassFish Server (Oracle Fusion Middleware ) Copyright© 2010, Oracle. All rights reserved.
  6. 6. GlassFish •  GlassFish v1 •  Java EE 5 •  •  GlassFish v2 •  Java EE 5 •  •  GlassFish v3 •  Java EE 6 •  •  OSGi Copyright© 2010, Oracle. All rights reserved.
  7. 7. •  1 Download /1Year Copyright© 2010, Oracle. All rights reserved.
  8. 8. •  •  •  •  •  •  •  •  •  •  •  •  Copyright© 2010, Oracle. All rights reserved.
  9. 9. GlassFish v3.1 2/28 •  Java EE 6 •  •  •  •  100 •  ssh •  •  •  GlasFish v2.x •  GlassFish API •  JAX-RS(RESTful API) Copyright© 2010, Oracle. All rights reserved.
  10. 10. •  •  GlassFish v2.1.1 34 % •  SSH •  •  •  glassfish-lbconfigurator-3_1.zip •  Metro •  Reliable messaging sequence failover •  Secure conversation session failover •  MQ •  Copyright© 2010, Oracle. All rights reserved.
  11. 11. GlassFish Copyright© 2010, Oracle. All rights reserved.
  12. 12. GlassFish Server Control Copyright© 2010, Oracle. All rights reserved.
  13. 13. GlassFish Server Control •  Oracle Access Manager (OAM)•  WebSphere/WebLogic JMS•  /• • • •  Oracle DataBase Thin Driver•  MySQL Database Driver•  Coherence *Web ( Ver 3.7) 2011•  DTrace ( JDK 7 ) Copyright© 2010, Oracle. All rights reserved.
  14. 14. / •  •  GlassFish v2.x → v3.1 •  3.x ( 3.0.x) → v3.1•  •  asadmin start-domain –upgrade mydomain Copyright© 2010, Oracle. All rights reserved.
  15. 15. •  •  •  http://glassfish.org •  PDF ZIP •  http://glassfish.org/docs•  •  •  http://www.oracle.com/goto/glassfish •  PDF •  http://download.oracle.com/docs/cd/E18930_01/ index.htm Copyright© 2010, Oracle. All rights reserved.
  16. 16. GlassFish Copyright© 2010, Oracle. All rights reserved.
  17. 17. Java EE 6 Copyright© 2010, Oracle. All rights reserved.
  18. 18. Java EE 6 •  •  •  Web •  Enterprise Platform•  Pruning •  •  •  •  DI, CDI, JAX-RS, Bean Validation •  •  JPA 2.0, EJB 3.1, JSF 2.0 Copyright© 2010, Oracle. All rights reserved.
  19. 19. Java EE 6 •  Java EE •  Spring, Struts, Wicket 3rd •  •  Servlet Servlet •  web fragment Copyright© 2010, Oracle. All rights reserved.
  20. 20. Java EE 6 •  Java EE •  Java EE •  •  •  Java EE 6 •  Web (Web ) •  Enterprise Platform( Java EE) Web Profile X Profile Y Profile Full Java EE 6 (Enterprise Platform) Copyright© 2010, Oracle. All rights reserved.
  21. 21. Web Web   •  Servlet •  JPA•  JSP / EL •  JTA•  JSTL •  DI/CDI•  JSF •  Managed Beans•  Bean Validation •  Interceptors•  EJB Lite •  Common Annotations Copyright© 2010, Oracle. All rights reserved.
  22. 22. Java EE 6 (Pruning) •  2 •  API •  •  (Java EE 7) •  JAX-RPC(->JAX-WS) •  EJB Entity Beans(->JPA) •  JAXR •  JSR-88 Copyright© 2010, Oracle. All rights reserved.
  23. 23. 
 Copyright© 2010, Oracle. All rights reserved.
  24. 24. Java EE 6 •  Servlet 3.0   •  JSP 2.2   •  JSF 2.0   •  EJB 3.1   •  JTA 1.1   •  JPA 2.0   •  JAX-WS 2.2   •  JAXB 2.2   •  JAX-RS 1.1•  DI 1.0/CDI 1.0 •  Bean Validation 1.0 Copyright© 2010, Oracle. All rights reserved.
  25. 25. Servlet 3.0 JSR-315 •  •  (web.xml) •  •  •  web-fragments.xml •  •  •  Servlet •  login/logout Copyright© 2010, Oracle. All rights reserved.
  26. 26. JavaServer Faces 2.0 JSR-314 •  (MVC) •  Facelets •  •  •  Ajax •  •  •  •  faces-config.xml•  Bean Validation •  Servlet •  Servlet 3.0 2.5 Copyright© 2010, Oracle. All rights reserved.
  27. 27. EJB 3.1 JSR-318 
 •  •  •  EJB 3.1 “Lite” •  •  Global JNDI •  Java SE EJB •  Copyright© 2010, Oracle. All rights reserved.
  28. 28. EJB Lite Web Profile •  Lite •  Full = Lite + •  Beans •  Message-Driven Beans •  CMT/BMT •  Web Service Endpoint •  Declarative Security •  2.x/3.x Remote view •  Interceptors •  RMI-IIOP Interoperability •  Timer Service •  Async method call •  2.x Local view •  CMP/BMP Entity Copyright© 2010, Oracle. All rights reserved.
  29. 29. Bean Validation 1.0 • • •  •  Bean •  Null•  JSF 2.0 •  f:validateRequired, f:validateRegexp •  ManagedBean •  @NotNull, @Size(max=40) String address•  JPA 2.0 •  Entity •  @NotNull, @Size(max=40) String address Copyright© 2010, Oracle. All rights reserved.
  30. 30. JAX-RS 1.1 •  RESTful HTTP API•  POJO •  API•  HTTP •  GET, POST, PUT, DELETE•  EJB JAX-RS Copyright© 2010, Oracle. All rights reserved.
  31. 31. Dependency Injection DI 1.0 / CDI 1.0 •  @Inject •  @Inject @LoggedIn User user;•  Injection •  Bean Inject •  EJB session beans •  Plain classes with @ManagedBean •  CDI •  beans.xml •  META-INF/ WEB-INF/ Copyright© 2010, Oracle. All rights reserved.
  32. 32. Oracle GlassFish Server v3 Copyright© 2010, Oracle. All rights reserved.
  33. 33. GlassFish v3 •  Java EE 6 •  Java EE 6 •  •  •  •  Web Full Platform •  •  RESTful •  OSGi •  I/O •  •  unzip (Tomcat )•  Oracle JRockit VM Copyright© 2010, Oracle. All rights reserved.
  34. 34. Oracle GlassFish Server •  Full Platform •  Java EE API•  Web •  Full Platform Web •  Web Full Platform    Copyright© 2010, Oracle. All rights reserved.
  35. 35. •  • •  •  Oracle •  C:glassfishv3bin> asadmin version --verbose = Oracle GlassFish Server 3.0.1 (build 22) JRE 1.6.0_21 version C:glassfishv3bin> asadmin version --verbose = GlassFish Server Open Source Edition 3.0.1 (build22) JRE 1.6.0_21 version Copyright© 2010, Oracle. All rights reserved.
  36. 36. GlassFish v3                                 Copyright© 2010, Oracle. All rights reserved.
  37. 37. GlassFish v3                         Copyright© 2010, Oracle. All rights reserved.
  38. 38. •  Web Profile •  4 (CPU: 2.4GHz Core 2Duo/4GB) •  •  •  •  Copyright© 2010, Oracle. All rights reserved.
  39. 39. GlassFish •  GlassFish •  domain1 •  (domain2, domain3 ) •  •  •  •  •  Web •  •  RESTful •  JMX/AMX domains Copyright© 2010, Oracle. All rights reserved.
  40. 40. •  Web •  http://IP_ADDRESS:PORT/ •  4848 •  •  •  •  •  •  •  http://IP_ADDRESS:4848 Copyright© 2010, Oracle. All rights reserved.
  41. 41. •  GlassFish •  $GLASSFISH_INSTALL/bin/asadmin •  > asadmin [ ] *[[-- ]] • •  •  •  Copyright© 2010, Oracle. All rights reserved.
  42. 42. RESTful GlassFish v3.0 •  RESTful •  GlassFish v3 •  HTML, JSON, XML •  HTTP •  Accept: application/html •  Accept: application/json •  Accept: application/xml •  JAX-RS •  GET •  POST http://IP_ADDRESS:4848/management/domain Copyright© 2010, Oracle. All rights reserved.
  43. 43. RESTful •  > curl -u admin:adminadmin -X GET -H "Accept: application/json" http:// ! localhost:4848/management/domain/configs/config/server-config/network-! config/network-listeners/network-listener/http-listener-1 { "HttpListener1":{"port":"8080", "enabled":"true", "protocol":"http-! listener-1” , "transport":"tcp", "address":"0.0.0.0", "name":"http-listener-1", "jk-enabled” :"false", "thread-pool":"http-thread-pool"},  … !  > curl -u admin:adminadmin -X POST -d "port=18080" -H "Accept: application/! json" http://localhost:4848/management/domain/configs/config/server-config/! network-config/network-listeners/network-listener/http-listener-1 "http://localhost:4848/management/domain/configs/config/server-config/! network-config/network-listeners/network-listener/http-listener-1" updated ! successfully. ! Copyright© 2010, Oracle. All rights reserved.
  44. 44. JMX/AMX •  JMX API Java •  JMX 8686 •  CLI/GU I • •  JMX •  JConsole(JDK ) •  MC4J Copyright© 2010, Oracle. All rights reserved.
  45. 45. 
 •  •  •  -keepSessions=true•  •  Eclipse •  NetBeans Copyright© 2010, Oracle. All rights reserved.
  46. 46. Oracle GlassFish Server v3.x Copyright© 2010, Oracle. All rights reserved.
  47. 47. GlassFish v3OSGi Copyright© 2010, Oracle. All rights reserved.
  48. 48. OSGi •  •  OSGi •  jar •  •  •  •  •  OSGi •  •  Java Java SE •  •  Copyright© 2010, Oracle. All rights reserved.
  49. 49. GlassFish v3 •  2 •  GlassFish OSGi •  OSGi Release 4 HK2 •  Apache Felix •  Knopflerfish, Equinox OSGi •  OSGi (static mode) •  OSGi (CLI/GUI) Java SE •  GlassFish Kernel (HK2: Hundred-Kilobyte Kernel) •  JSR-277 •  Java SE 7 Java SE 7 HK2 (Java SE 7 JSR-277 ) •  OSGi HK2 •  OSGi Copyright© 2010, Oracle. All rights reserved.
  50. 50. GlassFish OSGi HK2 •  OSGi •  : Apache Felix •  OSGi•  OSGi HK2 •  OSGi •  HK2 Service OSGi Mapper•  GlassFish •  GlassFish OSGi HK2 API OSGi •  OSGi •  @Resource DI Java SE Copyright© 2010, Oracle. All rights reserved.
  51. 51. OSGi             Copyright© 2010, Oracle. All rights reserved.
  52. 52. GlassFish OSGiApache Felix % telnet localhost 6666! Trying 127.0.0.1…! Connected to localhost.!Escape character is ‘^]’.!Felix Remote Shell Console:!============================!-> ps (GlassFish v3 )!START LEVEL 1!ID State Level Name![ 0] [Active ] [ 0] System Bundle (2.0.2)!…… ( )![ 245] [Installed ] [ 1] MyBundle (1.0.0)!-> start 245!-> stop 245! Copyright© 2010, Oracle. All rights reserved.
  53. 53. GlassFish v3 •  IPS (Image Packaging System: pkg (5))                     Swing GUI Copyright© 2010, Oracle. All rights reserved.
  54. 54. GlassFish Grizzly •  Grizzly •  •  Java NIO Java NIO •  GlassFish HTTP 2004 •  TCP/UDP/SSL •  •  Direct Byte Buffer/Heap Byte Buffer/View Byte Buffer •  •  GlassFish Grizzly •  GlassFish v2.1.x = Grizzly 1.0.x •  GlassFish v3.x = Grizzly 1.9.18 or later •  GlassFish v3 OSGi •  GlassFish v2.1(Grizzly 1.0.x) Copyright© 2010, Oracle. All rights reserved.
  55. 55. Non Blocking IO (Java New I/O) B B Thread-1 Thread-1B B Thread-2 Thread-2B B Thread-3 Thread-3 Copyright© 2010, Oracle. All rights reserved.
  56. 56. Non Blocking IO (Java New I/O) •  Comet •  streaming Event Event Event Event Event Copyright© 2010, Oracle. All rights reserved.
  57. 57. GlassFish •  GlassFish Embedded Server API •  EJB 3.1 Embeddable API Embedded Container •  Java SE GlassFish Transaction Security Messaging Manager System Engine•  Maven Plug-in •  Apache Maven Java SE •  JUnit •  EJB Copyright© 2010, Oracle. All rights reserved.
  58. 58. Copyright© 2010, Oracle. All rights reserved.
  59. 59. GlassFish v3.1 • •  •  SSH (Node Agent ) • •  WebSocket•  WebLogic •  WebLogic•  (Oracle GlassFish Server) •  DTrace (Java SE 7 )•  Coherence *Web ( ) Copyright© 2010, Oracle. All rights reserved.
  60. 60. •  •  MS1, Beta1, RC1, GA •  •  •  Copyright© 2010, Oracle. All rights reserved.
  61. 61. > asadmin deploy --name=HelloWorld:MS1 ./ ! HelloWorldWeb-MS1.war!! > asadmin deploy --enabled=false –-! name=HelloWorld:Beta ./HelloWorldWeb-Beta.war ! Application deployed with name HelloWorld:Beta.! Command deploy executed successfully. !! > asadmin deploy --enabled=false –-! name=HelloWorld:GA ./HelloWorldWeb-GA.war ! Application deployed with name HelloWorld:GA.! Command deploy executed successfully.! Copyright© 2010, Oracle. All rights reserved.
  62. 62. > asadmin enable HelloWorld:GA! Command enable executed successfully.!! > asadmin list-applications -l! NAME TYPE STATUS ! HelloWorld:MS1 <web> disabled ! HelloWorld:Beta <web> disabled ! HelloWorld:GA <web> enabled ! Command list-applications executed successfully. Copyright© 2010, Oracle. All rights reserved.
  63. 63. •  OS •  DAS: Windows Node Unix •  sshd •  Windows Cygwin •  SSH 8 http://tinyurl.com/3yto2gc Copyright© 2010, Oracle. All rights reserved.
  64. 64. GlassFish •  GlassFish •  domain1 •  (domain2, domain3 ) •  •  •  •  •  Web •  •  RESTful •  JMX/AMX domains Copyright© 2010, Oracle. All rights reserved.
  65. 65. •  •  Copyright© 2010, Oracle. All rights reserved.
  66. 66. •  Copyright© 2010, Oracle. All rights reserved.
  67. 67. GlassFish v2.1.1 •  •  GlassFish •  •  •  Copyright© 2010, Oracle. All rights reserved.
  68. 68. GlassFish v3.1 •  SSH •  SSH SSH Client Client •  Hudson(Trilead-ssh2) sshd sshd •  sshd •  •  GlassFish v3.1 M3 EA Copyright© 2010, Oracle. All rights reserved.
  69. 69. DemoSSH 1.  GlassFish DAS 2.  3.  4.  SSH 5.  GlassFish 6.  7.  8.  9.  http://tinyurl.com/3yto2gc Copyright© 2010, Oracle. All rights reserved.
  70. 70. > asadmin collect-log-files –-target cluster1! Log files are downloaded for instance1.! Log files are downloaded for instance2.! Created Zip file under ! /GlassFishv3.1/glassfish3/glassfish/domains/! domain1/collected-logs/log_2010-12-19_18-42-07.zip.! Command collect-log-files executed successfully. ! Copyright© 2010, Oracle. All rights reserved.
  71. 71. WebSocket WebSocket •  WebSocket TCP (Full Duplex) Web Web Copyright© 2010, Oracle. All rights reserved.
  72. 72. Comet •  Long Polling • •  Streaming •  Copyright© 2010, Oracle. All rights reserved.
  73. 73. Comet Long Polling •  •  HTTP 1.1 •  API •  Hidden iframe, XMLHttpRequest •  •  •  HTTP •  CPU Copyright© 2010, Oracle. All rights reserved.
  74. 74. Comet Streaming •  •  HTTP 1.1 •  API •  Hidden iframe, XMLHttpRequest •  Long polling •  •  •  Proxy Server Copyright© 2010, Oracle. All rights reserved.
  75. 75. WebSocket •  •  •  TCP •  /SSL •  HTTP •  ws://HOST:PORT/CONTEXT Copyright© 2010, Oracle. All rights reserved.
  76. 76. WebSocket •  •  •  TCP •  Proxy/Firewall •  •  •  Copyright© 2010, Oracle. All rights reserved.
  77. 77. WebSocket API http://dev.w3.org/html5/websockets/ Copyright© 2010, Oracle. All rights reserved.
  78. 78. 1000 Copyright© 2010, Oracle. All rights reserved.
  79. 79. WebSocket •  grizzly-websockets-chat-1.9.26-javadoc.jar •  grizzly-websockets-chat-1.9.26- javadoc.jar.md5 •  grizzly-websockets-chat-1.9.26- javadoc.jar.sha1 •  grizzly-websockets-chat-1.9.26-sources.jar •  grizzly-websockets-chat-1.9.26- sources.jar.md5 •  grizzly-websockets-chat-1.9.26- sources.jar.sha1 •  grizzly-websockets-chat-1.9.26.pom •  grizzly-websockets-chat-1.9.26.pom.md5 •  grizzly-websockets-chat-1.9.26.pom.sha1 •  grizzly-websockets-chat-1.9.26.war •  grizzly-websockets-chat-1.9.26.war.md5 •  grizzly-websockets-chat-1.9.26.war.sha1 http://tinyurl.com/2aejyfa Copyright© 2010, Oracle. All rights reserved.
  80. 80. Copyright© 2010, Oracle. All rights reserved.
  81. 81. Java EE 7 •  JPA 2.1 (JSR-338)•  JAX-RS 2.0 (JSR-339)•  JMS 2.0•  JavaServer Faces 2.2•  WebTier •  HTML 5 •  WebSocket •  JSON API Copyright© 2010, Oracle. All rights reserved.
  82. 82. •  Java EE 6 •  Java EE 6 •  •  •  •  Web Full Platform •  •  RESTful •  OSGi •  I/O •  •  unzip (Tomcat )•  Oracle JRockit VM Copyright© 2010, Oracle. All rights reserved.
  83. 83. Copyright© 2010, Oracle. All rights reserved.
  84. 84. OTN Oracle Technology Network(OTN)http://forums.oracle.com/forums/category.jspa?categoryID=492 OTN Java OTN Oracle http://www.oracle.com/technetwork/jp/java/index.html OTN OTN OTN Copyright© 2010, Oracle. All rights reserved.
  85. 85. OTN !! oracletechnetjpOTN Copyright© 2010, Oracle. All rights reserved.
  86. 86. Oracle http://blogs.oracle.com/oracle4engineer/ oracletechnetjp •  •  • •  •  •  ü  6 Oracle Database ü  Statspack Enterprise Manager Copyright© 2010, Oracle. All rights reserved.
  87. 87. IT Oracle Direct Concierge • Web NEW • Oracle Database•  •  •  • • SQL Server • BI EE• DB2 • • Sybase• MySQL• Postgre SQL • Oracle Database• Access • Weblogic Server NEW• Oracle Application Server Weblogic • Oracle Developer/2000(Froms/Reports) NEW Web 
 Copyright© 2010, Oracle. All rights reserved.
  88. 88. 1 5 Web •  1.  2.  3.  Web http://www.oracle.com/jp/direct/services/didemo-195748-ja.html Copyright© 2010, Oracle. All rights reserved.
  89. 89. 
 Oracle Direct Oracle Direct IT Web Copyright© 2010, Oracle. All rights reserved.

×