SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
TM
Enterprise JavaBeans
(EJBTM) 3.1
Kenneth Saks
Senior Staff Engineer
SUN Microsystems
EJB 3.1 Specification
• Goals
  > Continued focus on ease-of-use
  > New features
• JSR (Java Specification Request) 318
  > Part of Java EE 6
  > Java Persistence API will evolve separately ( JSR 317 )
  > Public Draft Released October 2008
• Caveat – APIs still subject to change


                                                         2
Ease of Use Improvements

•   Optional Local Business Interfaces
•   Simplified Packaging in .war
•   EJB “Lite”
•   Portable Global JNDI Names
•   Simplified Unit Testing




                                         3
Session Bean with “No-interface”
View
 @Stateless
 public class HelloBean {
     public String sayHello(String msg) {
         return “Hello “ + msg;
     }
 }


 // Client of HelloBean no-interface view
 @EJB HelloBean h;
 …
 h.sayHello(“bob”);


                                            4
Web/EJB Application in
    TM
Java EE Platform 5
           foo.ear                          foo.ear

                                    lib/foo_common.jar
  foo_web.war
  WEB-INF/web.xml                   com/acme/Foo.class
  WEB-INF/classes/
   com/acme/FooServlet.class        foo_web.war
  WEB-INF/classes
   com/acme/Foo.class          OR   WEB-INF/web.xml
                                    WEB-INF/classes/
                                     com/acme/FooServlet.class
  foo_ejb.jar
 com/acme/FooBean.class             foo_ejb.jar
 com/acme/Foo.class
                                    com/acme/FooBean.class


                                                                 5
Web/EJB Application in
    TM
Java EE Platform 6
                  foo.war

          WEB-INF/classes/
           com/acme/FooServlet.class

          WEB-INF/classes/
           com/acme/FooBean.class




                                       6
EJB “Lite” vs. Full EJB 3.1 API
EJB Lite                      Full = Lite + :
• Local Session Beans         • Message Driven Beans
• Annotations / ejb-jar.xml   • EJB Web Service
• CMT / BMT                     Endpoints
• Declarative Security        • RMI-IIOP
                                Interoperability
• Interceptors
                              • 2.x / 3.x Remote view
                              • 2.x Local view
                              • Timer Service
                              • CMP / BMP             7
Portable Global JNDI Names
 “java:global[/<app-name>]/<module-
 name>/<bean-name>”

 // Client in a Java EE container
 @EJB(mappedName=
      ”java:global/hello/HelloBean”)
 Hello hello;


 // Client in a Java SE environment
 Hello hello = (Hello) new InitialContext()
     lookup(“java:global/hello/HelloBean”);

                                         8
Enhanced Testing Support
 public class BankTester {

   public static void main(String[] args) {

       EJBContainer container =
          EJBContainer.createEJBContainer();

       // Acquire EJB component reference
       BankBean bank = (BankBean)container.getContext().
          lookup(“java:global/bank/BankBean”);

       testBank(bank);
       ...
       container.close();
   }

                                                   9
Example : Embeddable API (cont.)
 % java -classpath bankClient.jar :
                   bank.jar :
                   javaee.jar :
                   <vendor_rt>.jar

                   com.acme.BankTester




                                         10
New Features

•   Singletons
•   Application startup / shutdown callbacks
•   Calendar-based timer expressions
•   Automatic timer creation
•   Simple Asynchrony




                                               11
Simple Singleton
 @Singleton
 public class SharedBean {

     private SharedData shared;

     @PostConstruct private void init() {
       shared = ...;
     }

     public int getXYZ() {
       return shared.xyz;
     }

 }


                                            12
Singleton Client
 @Stateless
 public class FooBean {

     @EJB
     private SharedBean shared;

     public void foo() {
       int xyz = shared.getXYZ();
       ...
     }

 }




                                    13
Automatic Timer Creation
 @Stateless
 public class BankBean {

     @PersistenceContext EntityManager accountDB;
     @Resource javax.mail.Session mailSession;

     // Callback the 1st of each month at 8 a.m.

     @Schedule(hour=”8”, dayOfMonth=”1”)
     void sendMonthlyBankStatements() {
       ...
     }

 }




                                                    14
Simple Asynchrony
 @Stateless public class DocBean {

     @Resource SessionContext ctx;

     public void processDocument(Document document) {
       DocBean me = ctx.getBusinessObject(DocBean.class);
       me.doAnalysisA(document);
       me.doAnalysisB(document);
     }

     @Asynchronous public void doAnalysisA(Document d) {...}

     @Asynchronous public void doAnalysisB(Document d) {...}

 }


                                                            15
Asynchronous Operation Results --
Client
 @EJB Processor processor;

 Task task = new Task(...);

 Future<int> computeTask = processor.compute(task);

 ...

 int result = computeTask.get();




                                                 16
EJB 3.1 and Glassfish V3 Prelude
• Glassfish V3 is reference implementation for EJB 3.1
• V3 Prelude has preview implementations of these
  EJB 3.1 features :
  >   No-interface view
  >   .war packaging of stateless session beans
  >   Singletons
  >   Portable Global JNDI Names
• EJB 3.1 preview module available from Update Tool


                                                  17
For More Information
• JSR 318 Home : http://jcp.org/en/jsr/detail?id=318
  > Send comments to jsr-318-comments@jcp.org
• Blog : http://blogs.sun.com/kensaks/
• Reference Implementation : GlassFish project V3
  > http://glassfish.dev.java.net
  > ejb@glassfish.dev.java.net




                                                    18

Contenu connexe

Tendances

Jsp interview questions by java training center
Jsp interview questions by java training centerJsp interview questions by java training center
Jsp interview questions by java training center
Maheshit Jtc
 

Tendances (20)

Jsp chapter 1
Jsp chapter 1Jsp chapter 1
Jsp chapter 1
 
Wt unit 4
Wt unit 4Wt unit 4
Wt unit 4
 
Jsp (java server page)
Jsp (java server page)Jsp (java server page)
Jsp (java server page)
 
Jsp interview questions by java training center
Jsp interview questions by java training centerJsp interview questions by java training center
Jsp interview questions by java training center
 
Jsp Slides
Jsp SlidesJsp Slides
Jsp Slides
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Java EE 7 - Into the Cloud
Java EE 7 - Into the CloudJava EE 7 - Into the Cloud
Java EE 7 - Into the Cloud
 
Wt unit 3
Wt unit 3 Wt unit 3
Wt unit 3
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
1 java servlets and jsp
1   java servlets and jsp1   java servlets and jsp
1 java servlets and jsp
 
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 
Java server pages
Java server pagesJava server pages
Java server pages
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
 
JSP Directives
JSP DirectivesJSP Directives
JSP Directives
 
Jsp elements
Jsp elementsJsp elements
Jsp elements
 
Jsp presentation
Jsp presentationJsp presentation
Jsp presentation
 
Jsp element
Jsp elementJsp element
Jsp element
 
Being agile with modern Java
Being agile with modern JavaBeing agile with modern Java
Being agile with modern Java
 

Similaire à EJB 3.1 and GlassFish v3 Prelude

J2EE - Practical Overview
J2EE - Practical OverviewJ2EE - Practical Overview
J2EE - Practical Overview
Svetlin Nakov
 
Session 4 Tp4
Session 4 Tp4Session 4 Tp4
Session 4 Tp4
phanleson
 

Similaire à EJB 3.1 and GlassFish v3 Prelude (20)

GlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for EclipseGlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for Eclipse
 
What's New in Enterprise JavaBean Technology ?
What's New in Enterprise JavaBean Technology ?What's New in Enterprise JavaBean Technology ?
What's New in Enterprise JavaBean Technology ?
 
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
 
J2 Ee Overview
J2 Ee OverviewJ2 Ee Overview
J2 Ee Overview
 
J2EE - Practical Overview
J2EE - Practical OverviewJ2EE - Practical Overview
J2EE - Practical Overview
 
Seam Glassfish Perspective
Seam Glassfish PerspectiveSeam Glassfish Perspective
Seam Glassfish Perspective
 
EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Session 4 Tp4
Session 4 Tp4Session 4 Tp4
Session 4 Tp4
 
GlassFish v3 : En Route Java EE 6
GlassFish v3 : En Route Java EE 6GlassFish v3 : En Route Java EE 6
GlassFish v3 : En Route Java EE 6
 
JBoss AS7 OSDC 2011
JBoss AS7 OSDC 2011JBoss AS7 OSDC 2011
JBoss AS7 OSDC 2011
 
What's new in Java EE 6
What's new in Java EE 6What's new in Java EE 6
What's new in Java EE 6
 
Skillwise EJB3.0 training
Skillwise EJB3.0 trainingSkillwise EJB3.0 training
Skillwise EJB3.0 training
 
Glass Fishv3 March2010
Glass Fishv3 March2010Glass Fishv3 March2010
Glass Fishv3 March2010
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for future
 
EJB .
EJB .EJB .
EJB .
 
Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)
 

Plus de Eduardo Pelegri-Llopart

Plus de Eduardo Pelegri-Llopart (20)

Juggling at freenome
Juggling   at freenomeJuggling   at freenome
Juggling at freenome
 
Csumb capstone-fall2016
Csumb capstone-fall2016Csumb capstone-fall2016
Csumb capstone-fall2016
 
Digital activitymanagement
Digital activitymanagementDigital activitymanagement
Digital activitymanagement
 
Progress next iot_pelegri
Progress next iot_pelegriProgress next iot_pelegri
Progress next iot_pelegri
 
Pelegri Desarrollando en una nueva era de software
Pelegri   Desarrollando en una nueva era de software Pelegri   Desarrollando en una nueva era de software
Pelegri Desarrollando en una nueva era de software
 
Market trends in IT - exchange cala - October 2015
Market trends in IT - exchange cala - October 2015Market trends in IT - exchange cala - October 2015
Market trends in IT - exchange cala - October 2015
 
The impact of IOT - exchange cala - 2015
The impact of IOT - exchange cala - 2015The impact of IOT - exchange cala - 2015
The impact of IOT - exchange cala - 2015
 
IOT - Presentation to PEP @ Progress
IOT - Presentation to PEP @ ProgressIOT - Presentation to PEP @ Progress
IOT - Presentation to PEP @ Progress
 
Node.js as an IOT Bridge
Node.js as an IOT BridgeNode.js as an IOT Bridge
Node.js as an IOT Bridge
 
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
 
What is the Internet of Things and How it Impacts You
What is the Internet of Things and How it Impacts YouWhat is the Internet of Things and How it Impacts You
What is the Internet of Things and How it Impacts You
 
Community Update 25 Mar2010 - English
Community Update 25 Mar2010 - EnglishCommunity Update 25 Mar2010 - English
Community Update 25 Mar2010 - English
 
GlassFish Community Update 25 Mar2010
GlassFish Community Update 25 Mar2010GlassFish Community Update 25 Mar2010
GlassFish Community Update 25 Mar2010
 
Glass Fish Portfolio C1 West V3.Mini
Glass Fish Portfolio C1 West V3.MiniGlass Fish Portfolio C1 West V3.Mini
Glass Fish Portfolio C1 West V3.Mini
 
Virtual Box Aquarium May09
Virtual Box Aquarium May09Virtual Box Aquarium May09
Virtual Box Aquarium May09
 
Introduction To Web Beans
Introduction To Web BeansIntroduction To Web Beans
Introduction To Web Beans
 
Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage Patterns
 
OpenDS Primer Aquarium
OpenDS Primer AquariumOpenDS Primer Aquarium
OpenDS Primer Aquarium
 
Fuji Overview
Fuji OverviewFuji Overview
Fuji Overview
 
Nuxeo 5.2 Glassfish
Nuxeo 5.2 GlassfishNuxeo 5.2 Glassfish
Nuxeo 5.2 Glassfish
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

EJB 3.1 and GlassFish v3 Prelude

  • 1. TM Enterprise JavaBeans (EJBTM) 3.1 Kenneth Saks Senior Staff Engineer SUN Microsystems
  • 2. EJB 3.1 Specification • Goals > Continued focus on ease-of-use > New features • JSR (Java Specification Request) 318 > Part of Java EE 6 > Java Persistence API will evolve separately ( JSR 317 ) > Public Draft Released October 2008 • Caveat – APIs still subject to change 2
  • 3. Ease of Use Improvements • Optional Local Business Interfaces • Simplified Packaging in .war • EJB “Lite” • Portable Global JNDI Names • Simplified Unit Testing 3
  • 4. Session Bean with “No-interface” View @Stateless public class HelloBean { public String sayHello(String msg) { return “Hello “ + msg; } } // Client of HelloBean no-interface view @EJB HelloBean h; … h.sayHello(“bob”); 4
  • 5. Web/EJB Application in TM Java EE Platform 5 foo.ear foo.ear lib/foo_common.jar foo_web.war WEB-INF/web.xml com/acme/Foo.class WEB-INF/classes/ com/acme/FooServlet.class foo_web.war WEB-INF/classes com/acme/Foo.class OR WEB-INF/web.xml WEB-INF/classes/ com/acme/FooServlet.class foo_ejb.jar com/acme/FooBean.class foo_ejb.jar com/acme/Foo.class com/acme/FooBean.class 5
  • 6. Web/EJB Application in TM Java EE Platform 6 foo.war WEB-INF/classes/ com/acme/FooServlet.class WEB-INF/classes/ com/acme/FooBean.class 6
  • 7. EJB “Lite” vs. Full EJB 3.1 API EJB Lite Full = Lite + : • Local Session Beans • Message Driven Beans • Annotations / ejb-jar.xml • EJB Web Service • CMT / BMT Endpoints • Declarative Security • RMI-IIOP Interoperability • Interceptors • 2.x / 3.x Remote view • 2.x Local view • Timer Service • CMP / BMP 7
  • 8. Portable Global JNDI Names “java:global[/<app-name>]/<module- name>/<bean-name>” // Client in a Java EE container @EJB(mappedName= ”java:global/hello/HelloBean”) Hello hello; // Client in a Java SE environment Hello hello = (Hello) new InitialContext() lookup(“java:global/hello/HelloBean”); 8
  • 9. Enhanced Testing Support public class BankTester { public static void main(String[] args) { EJBContainer container = EJBContainer.createEJBContainer(); // Acquire EJB component reference BankBean bank = (BankBean)container.getContext(). lookup(“java:global/bank/BankBean”); testBank(bank); ... container.close(); } 9
  • 10. Example : Embeddable API (cont.) % java -classpath bankClient.jar : bank.jar : javaee.jar : <vendor_rt>.jar com.acme.BankTester 10
  • 11. New Features • Singletons • Application startup / shutdown callbacks • Calendar-based timer expressions • Automatic timer creation • Simple Asynchrony 11
  • 12. Simple Singleton @Singleton public class SharedBean { private SharedData shared; @PostConstruct private void init() { shared = ...; } public int getXYZ() { return shared.xyz; } } 12
  • 13. Singleton Client @Stateless public class FooBean { @EJB private SharedBean shared; public void foo() { int xyz = shared.getXYZ(); ... } } 13
  • 14. Automatic Timer Creation @Stateless public class BankBean { @PersistenceContext EntityManager accountDB; @Resource javax.mail.Session mailSession; // Callback the 1st of each month at 8 a.m. @Schedule(hour=”8”, dayOfMonth=”1”) void sendMonthlyBankStatements() { ... } } 14
  • 15. Simple Asynchrony @Stateless public class DocBean { @Resource SessionContext ctx; public void processDocument(Document document) { DocBean me = ctx.getBusinessObject(DocBean.class); me.doAnalysisA(document); me.doAnalysisB(document); } @Asynchronous public void doAnalysisA(Document d) {...} @Asynchronous public void doAnalysisB(Document d) {...} } 15
  • 16. Asynchronous Operation Results -- Client @EJB Processor processor; Task task = new Task(...); Future<int> computeTask = processor.compute(task); ... int result = computeTask.get(); 16
  • 17. EJB 3.1 and Glassfish V3 Prelude • Glassfish V3 is reference implementation for EJB 3.1 • V3 Prelude has preview implementations of these EJB 3.1 features : > No-interface view > .war packaging of stateless session beans > Singletons > Portable Global JNDI Names • EJB 3.1 preview module available from Update Tool 17
  • 18. For More Information • JSR 318 Home : http://jcp.org/en/jsr/detail?id=318 > Send comments to jsr-318-comments@jcp.org • Blog : http://blogs.sun.com/kensaks/ • Reference Implementation : GlassFish project V3 > http://glassfish.dev.java.net > ejb@glassfish.dev.java.net 18