SlideShare a Scribd company logo
1 of 41
Java EE 6
The Future of Enterprise Applications




                                        copyright 2008 trainologic LTD
Java EE 6



• Introduction.
• New Concepts.
• New Components.
• Q&A.




                    copyright 2008 trainologic LTD
Java EE 6



                    Introduction

• Java EE 5, was all about ease of development.
• The major change was made by moving to EJB 3.
• Java EE 6, A.K.A JSR 316, will make the use of Java EE
  easier and more feasible in different environments.




                            3
                                                  copyright 2008 trainologic LTD
Java EE 6



                     Introduction

• The status of the JSR is Early Draft Review.
• Release is expected in May 09, but as we have already
  learned, it might not be exactly on time...




                             4
                                                 copyright 2008 trainologic LTD
Java EE 6



            Goals




              5
                    copyright 2008 trainologic LTD
Java EE 6



                          Goals

• Easier to Use, Easier to Learn.




                             5
                                    copyright 2008 trainologic LTD
Java EE 6



                          Goals

• Easier to Use, Easier to Learn.
  Well, this is the usual stuff. What’s really new???




                             5
                                                  copyright 2008 trainologic LTD
Java EE 6



                          Goals

• Easier to Use, Easier to Learn.
  Well, this is the usual stuff. What’s really new???

• Easier Extensibility - More ways to integrate
  frameworks.




                             5
                                                  copyright 2008 trainologic LTD
Java EE 6



                          Goals

• Easier to Use, Easier to Learn.
  Well, this is the usual stuff. What’s really new???

• Easier Extensibility - More ways to integrate
  frameworks.

• Easier to Evolve - The size and wideness of the Java EE
  has made it difficult to evolve. Profiles and Pruning
  should take care of that.




                             5
                                                  copyright 2008 trainologic LTD
Java EE 6



                          Goals

• Easier to Use, Easier to Learn.
  Well, this is the usual stuff. What’s really new???

• Easier Extensibility - More ways to integrate
  frameworks.

• Easier to Evolve - The size and wideness of the Java EE
  has made it difficult to evolve. Profiles and Pruning
  should take care of that.

• SOA - Better support for SOA is also defined as a goal
  of the new spec.


                             5
                                                  copyright 2008 trainologic LTD
Java EE 6



• Introduction.
• New Concepts.
• New Components.
• Q&A.




                    copyright 2008 trainologic LTD
Java EE 6



                      Extensibility

• During the lifetime of the Java EE platform, many
  frameworks has evolved.

• Several of these frameworks became de-facto
  standards, like Struts and Facelets.

• Integrating these frameworks with a Java EE
  application is a pain.

• Java EE 6 plans to “relief” this pain.




                              7
                                                copyright 2008 trainologic LTD
Java EE 6



                     Extensibility

• Java EE 6 Embraces the frameworks by supplying auto
  discovery of Servlets, Servlet Filters and Web
  Application Listeners.

• These are all widely used integration point for known
  frameworks.

• The Connector Architecture SPI is expected to change
  as well.




                             8
                                                   copyright 2008 trainologic LTD
Java EE 6



                         Profiles

• Java EE has became a huge platform.
• Most Java EE projects do not use major part of the
  platform.
• For example, there are many cases where EJBs are not
  in use while Servlets, Naming and JDBC are.

• Profiles tries to focus the Java EE platform towards
  specific classes of applications.




                              9
                                                 copyright 2008 trainologic LTD
Java EE 6



                                Profiles

• “A profile is a configuration of the Java EE platform
  targeted at a specific class of applications.” the Java EE 6
  Specification, early draft.

• The idea is to identify typical uses of the platform and
  create a profile that includes only the parts of the
  platform which are relevant to the typical use.




                                   10
                                                    copyright 2008 trainologic LTD
Java EE 6



                         Profiles

• So... is a profile just a bundle of Java EE sub
  specifications?

• No, each profile must include the minimum set of
  mandatory components and may add some other
  components which are not part of Java EE.

• Moreover, a profile must implement the special
  interactions between the different components, like
  dependency injection.




                             11
                                                    copyright 2008 trainologic LTD
Java EE 6



                         Profiles

• Each profile is defined by the JCP as a separate JSR.
• The first profile is already defined by the Java EE 6
  spec: The Web Profile.
• You have guessed correctly, it is for web applications.




                             12
                                                  copyright 2008 trainologic LTD
Java EE 6



                         Pruning

• As the Java EE platform is getting older, it is carrying
  some pre-historic creatures like EJB Entity Beans on its
  back.

• A process called pruning is starting with Java EE 6.
• Marking a component as pruned, means it is candidate
  to become optional.

• Pruning is marked in the JavaDoc.




                             13
                                                   copyright 2008 trainologic LTD
Java EE 6



                          Pruning

• A component marked pruned at the current version
  may become optional in the next version.

• It is for the comity of the next version to decide it the
  component becomes optional or not.

• Current Pruning list:
      JAX-RPC - Replaced by JAX-WS.
  •

      EJB Entity Beans - Replaced by JPA.
  •

      JAXR - API for XML Registries, never widely adopted.
  •

      JSR 88 - Deployment API, never widely adopted.
  •

                              14
                                                   copyright 2008 trainologic LTD
Java EE 6



• Introduction.
• New Concepts.
• New Components.
• Q&A.




                    copyright 2008 trainologic LTD
Java EE 6



                  New Components

• EJB 3.1                    • JAXB 2.2
• JPA 2.0                    • JAX-WS 2.2
• Servlets 3.0               • EL 1.2
• JSF 2.0                    • JSP 2.1
• JAX-RS 1.0                 • Authentication SPI
• JCA 1.6                    • Concurrency Utilities
• Web Beans 1.0
• Bean Validation 1.0

                        16
                                             copyright 2008 trainologic LTD
Java EE 6



                 New Components

• As you can see, there is a long list of components.
• We will explore the most popular ones:
      EJB
  •

      JPA
  •

      Servlets
  •

      JSF
  •




                            17
                                                 copyright 2008 trainologic LTD
Java EE 6



                          EJB 3.1

• Stage: Public Review.
• The long waited Singleton bean has arrived.
• No Object Interface required.
• Asynchronous business methods.
• Standard global JNDI name:
      java:global/app/module/bean#interface
  •




                            18
                                                copyright 2008 trainologic LTD
Java EE 6



               EJB 3.1 - Singleton

• Up to version 3.1 there was no easy way to share data
  throughout the application.

• The EJB 3.1 Singleton is an Application wide Singleton.
• Concurrency can be managed either by the container or
  by the Bean Developer.

• Container Managed Concurrency enables Read/Write
  Lock using annotations.




                            19
                                               copyright 2008 trainologic LTD
Java EE 6



                    EJB 3.1 - Singleton
            @Singleton
            public class DiscountRateBean {
                @PersistenceContext
                private EntityManager entityManager;
                private Rate rate;

                @PostConstruct
                private void init() {
                    rate = entityManager.find(Rate.class, 1);
                }

                @ConcurrencyAttribute(READ_WRITE_LOCK)
                public void setRate(Rate rate) {
                    this.rate = rate;
                }

                @ConcurrencyAttribute(READ_LOCK)
                public Rate getRate() {
                    return rate;
                }
            }



                                    20
                                                                copyright 2008 trainologic LTD
Java EE 6



             EJB 3.1 - Asynchronous

• In Java EE there is a rule in the specification forbidding
  the developer from opening new threads.

• The “correct” way to perform asynchronous operations
  in Java EE is using JMS. This is quite cumbersome...

• EJB 3.1 solves this problem by presenting the new
  asynchronous method calls in session beans.

• Since the method returns before creating the return
  value, it can either be void or return a Future.



                             21
                                                     copyright 2008 trainologic LTD
Java EE 6



                  EJB 3.1 - Asynchronous

@Stateless
public class OrderBillingServiceBean implements OrderBillingService {
    ...

      @Asynchronous
      public Future<OrderStatus> billOrder(Order order) {
          try {
              // Attempt to charge the order.
              bill(order);
              return new AsyncResult<OrderStatus>(OrderStatus.COMPLETE);
          } catch (BillingException be) {
              // Send email notification of billing failure.
              notifyBillingFailure(be, order);
              return new AsyncResult<OrderStatus>
                  (OrderStatus.BILLING_FAILED);
          }
      }
}




                                    22
                                                            copyright 2008 trainologic LTD
Java EE 6



                      EJB 3.1 - Lite

• EJBs outside of the container.
• Subset of EJB 3.1
• Embeddable container API.
• Bootstrap on Java SE.




                            23
                                       copyright 2008 trainologic LTD
Java EE 6



            EJB 3.1 - Lite




                  24
                             copyright 2008 trainologic LTD
Java EE 6



                           JPA 2.0

• More sophisticated mapping options:
      Access control in the property/field level.
  •

      Orphan Removal.
  •

• Order Columns.
• Persisting non-entity collections.




                               25
                                                    copyright 2008 trainologic LTD
Java EE 6



                        JPA 2.0

• Relationships in embeddable objects.
• Unidirectional one to many with foreign key.
• Criteria API for Querying.
• Validation by JSR 303.




                               26
                                                 copyright 2008 trainologic LTD
Java EE 6



                     Servlets 3.0

• Stage: Public Review.
• Annotation based configuration.
• Auto-discovery of Servlets, Filters and Listeners.
• Modular web.xml.
• Asynchronous Support.
• Authentication API.
• HTTP-Only Cookies.



                             27
                                                  copyright 2008 trainologic LTD
Java EE 6



            Servlets 3.0 - Annotations

• Like in EJB, deployment descriptors becomes
  completely optional in Servlets 3.0

• All configuration can be defined using annotations.
• In case annotations and xml co-exist, the data in the
  xml takes precedence over the data in the annotations.




                            28
                                                copyright 2008 trainologic LTD
Java EE 6



            Servlets 3.0 - Annotations



       @Servlet(urlMappings={quot;/MyAppquot;})
       public class MyServlet {
           @GET
           public void handleGet(HttpServletRequest req,
                                 HttpServletResponse res) {
                       ....
           }
       }




                                29
                                                        copyright 2008 trainologic LTD
Java EE 6



            Servlets 3.0 - Asynchronous
                     Invocation
• Sometimes we need to perform a long running blocking
  operation as a part of a Servlet request.

• Performing this kind of operation from the thread
  running the servlet code is not efficient.

• This can cause a starvation in cases this operation
  common.

• Asynchronous Invocation solves this problem by
  releasing the original thread and passing the control to
  another thread.


                             30
                                                 copyright 2008 trainologic LTD
Java EE 6



              Servlets 3.0 - Asynchronous
                       Invocation


@WebServlet(quot;/fooquot; asyncSupported=true)
public class MyServlet extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res) {
        ...
        AsyncContext aCtx = request.startAsync(req, res);
        ScheduledThreadPoolExecutor executor = new ThreadPoolExecutor(10);
        executor.execute(new AsyncWebService(aCtx));
    }
}




                                    31
                                                           copyright 2008 trainologic LTD
Java EE 6



            Servlets 3.0 - Asynchronous
                     Invocation


 public class AsyncWebService implements Runnable {
     AsyncContext ctx;
     public AsyncWebService(AsyncContext ctx) {
          this.ctx = ctx;
     }
     public void run() {
         // Invoke web service and save result in request attribute
         // Forward the request to render the result to a JSP.
         ctx.forward(quot;/render.jspquot;);
     }
 }




                                 32
                                                        copyright 2008 trainologic LTD
Java EE 6



                          JSF 2.0

• Stage: Public Review.
• ProjectStage, did anybody say ROR?
      The value is set using JNDI or Context parameter.
  •

      Can be one of Production, Development, UnitTest,
  •
      SystemTest or Extension.
      Then you can query for the stage using:
  •
      Application.getProjectStage()




                              33
                                                  copyright 2008 trainologic LTD
Java EE 6



                          JSF 2.0

• Better Resource management for components.
• Resource re-location.
• Both of these features enables component authors to
  load their own resources like css, js scrips, images and
  other resources.




                            34
                                                 copyright 2008 trainologic LTD
Java EE 6



                        JSF 2.0

• Enhanced flexible event mechanism.
• New Scope: View.
• Full Ajax support including partial processing and js
  Library.

• Facelets.




                             35
                                                 copyright 2008 trainologic LTD
Thank You



            Q&A
             Gal Marder,

             CEO, Trainologic LTD




                  copyright 2008 trainologic LTD

More Related Content

What's hot

Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Shreedhar Ganapathy
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Codecamp Romania
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011Arun Gupta
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Agora Group
 
J2EE vs JavaEE
J2EE vs JavaEEJ2EE vs JavaEE
J2EE vs JavaEEeanimou
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011Arun Gupta
 
Java 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the GalleryJava 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the Gallerynjbartlett
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Skills Matter
 
Ejb 3.0 Runtime Environment
Ejb 3.0 Runtime EnvironmentEjb 3.0 Runtime Environment
Ejb 3.0 Runtime Environmentrradhak
 
Fifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 MinutesFifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 Minutesglassfish
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nationArun Gupta
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5Arun Gupta
 
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 CEJUGArun Gupta
 
Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...Edureka!
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Arun Gupta
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGArun Gupta
 
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 futureArun Gupta
 
Java 9 Module System
Java 9 Module SystemJava 9 Module System
Java 9 Module SystemHasan Ünal
 

What's hot (20)

Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011
 
J2EE vs JavaEE
J2EE vs JavaEEJ2EE vs JavaEE
J2EE vs JavaEE
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011
 
Java 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the GalleryJava 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the Gallery
 
Java 9
Java 9Java 9
Java 9
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
 
Ejb 3.0 Runtime Environment
Ejb 3.0 Runtime EnvironmentEjb 3.0 Runtime Environment
Ejb 3.0 Runtime Environment
 
Fifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 MinutesFifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 Minutes
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nation
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5
 
JPA and Hibernate
JPA and HibernateJPA and Hibernate
JPA and Hibernate
 
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 Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
 
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
 
Java 9 Module System
Java 9 Module SystemJava 9 Module System
Java 9 Module System
 

Similar to What's new in Java EE 6

GlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for EclipseGlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for EclipseLudovic Champenois
 
New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SEdogangoko
 
JavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUGJavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUGMarakana Inc.
 
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010Arun Gupta
 
What's Expected in Java 7
What's Expected in Java 7What's Expected in Java 7
What's Expected in Java 7Gal Marder
 
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Arun Gupta
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopArun Gupta
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaArun Gupta
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureIndicThreads
 
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 futureArun Gupta
 
Whats Cool in Java E 6
Whats Cool in Java E 6Whats Cool in Java E 6
Whats Cool in Java E 6Arun Gupta
 
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011Arun Gupta
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusArun Gupta
 
Why should i switch to Java SE 7
Why should i switch to Java SE 7Why should i switch to Java SE 7
Why should i switch to Java SE 7Vinay H G
 
Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6Arun Gupta
 

Similar to What's new in Java EE 6 (20)

Java EE6 Overview
Java EE6 OverviewJava EE6 Overview
Java EE6 Overview
 
Java EE 6 Aquarium Paris
Java EE 6 Aquarium ParisJava EE 6 Aquarium Paris
Java EE 6 Aquarium Paris
 
GlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for EclipseGlassFish Tool Bundle for Eclipse
GlassFish Tool Bundle for Eclipse
 
Java EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolioJava EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolio
 
New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SE
 
JavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUGJavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUG
 
Java E
Java EJava E
Java E
 
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
 
What's Expected in Java 7
What's Expected in Java 7What's Expected in Java 7
What's Expected in Java 7
 
Java EE 6
Java EE 6Java EE 6
Java EE 6
 
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 Workshop
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The Future
 
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
 
Whats Cool in Java E 6
Whats Cool in Java E 6Whats Cool in Java E 6
Whats Cool in Java E 6
 
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexus
 
Why should i switch to Java SE 7
Why should i switch to Java SE 7Why should i switch to Java SE 7
Why should i switch to Java SE 7
 
Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6
 

More from Gal Marder

Should i break it?
Should i break it?Should i break it?
Should i break it?Gal Marder
 
Reactive Micro Services with Java seminar
Reactive Micro Services with Java seminarReactive Micro Services with Java seminar
Reactive Micro Services with Java seminarGal Marder
 
JVM languages "flame wars"
JVM languages "flame wars"JVM languages "flame wars"
JVM languages "flame wars"Gal Marder
 
Dive into spark2
Dive into spark2Dive into spark2
Dive into spark2Gal Marder
 
Stream processing from single node to a cluster
Stream processing from single node to a clusterStream processing from single node to a cluster
Stream processing from single node to a clusterGal Marder
 
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...Gal Marder
 
Spark real world use cases and optimizations
Spark real world use cases and optimizationsSpark real world use cases and optimizations
Spark real world use cases and optimizationsGal Marder
 
What’s expected in Java 9
What’s expected in Java 9What’s expected in Java 9
What’s expected in Java 9Gal Marder
 
What’s expected in Spring 5
What’s expected in Spring 5What’s expected in Spring 5
What’s expected in Spring 5Gal Marder
 
Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarMulti-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarGal Marder
 

More from Gal Marder (10)

Should i break it?
Should i break it?Should i break it?
Should i break it?
 
Reactive Micro Services with Java seminar
Reactive Micro Services with Java seminarReactive Micro Services with Java seminar
Reactive Micro Services with Java seminar
 
JVM languages "flame wars"
JVM languages "flame wars"JVM languages "flame wars"
JVM languages "flame wars"
 
Dive into spark2
Dive into spark2Dive into spark2
Dive into spark2
 
Stream processing from single node to a cluster
Stream processing from single node to a clusterStream processing from single node to a cluster
Stream processing from single node to a cluster
 
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
Implementing Micro Services Tasks (service discovery, load balancing etc.) - ...
 
Spark real world use cases and optimizations
Spark real world use cases and optimizationsSpark real world use cases and optimizations
Spark real world use cases and optimizations
 
What’s expected in Java 9
What’s expected in Java 9What’s expected in Java 9
What’s expected in Java 9
 
What’s expected in Spring 5
What’s expected in Spring 5What’s expected in Spring 5
What’s expected in Spring 5
 
Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarMulti-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and Quasar
 

Recently uploaded

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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 Scriptwesley chun
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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 Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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 DevelopmentsTrustArc
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

What's new in Java EE 6

  • 1. Java EE 6 The Future of Enterprise Applications copyright 2008 trainologic LTD
  • 2. Java EE 6 • Introduction. • New Concepts. • New Components. • Q&A. copyright 2008 trainologic LTD
  • 3. Java EE 6 Introduction • Java EE 5, was all about ease of development. • The major change was made by moving to EJB 3. • Java EE 6, A.K.A JSR 316, will make the use of Java EE easier and more feasible in different environments. 3 copyright 2008 trainologic LTD
  • 4. Java EE 6 Introduction • The status of the JSR is Early Draft Review. • Release is expected in May 09, but as we have already learned, it might not be exactly on time... 4 copyright 2008 trainologic LTD
  • 5. Java EE 6 Goals 5 copyright 2008 trainologic LTD
  • 6. Java EE 6 Goals • Easier to Use, Easier to Learn. 5 copyright 2008 trainologic LTD
  • 7. Java EE 6 Goals • Easier to Use, Easier to Learn. Well, this is the usual stuff. What’s really new??? 5 copyright 2008 trainologic LTD
  • 8. Java EE 6 Goals • Easier to Use, Easier to Learn. Well, this is the usual stuff. What’s really new??? • Easier Extensibility - More ways to integrate frameworks. 5 copyright 2008 trainologic LTD
  • 9. Java EE 6 Goals • Easier to Use, Easier to Learn. Well, this is the usual stuff. What’s really new??? • Easier Extensibility - More ways to integrate frameworks. • Easier to Evolve - The size and wideness of the Java EE has made it difficult to evolve. Profiles and Pruning should take care of that. 5 copyright 2008 trainologic LTD
  • 10. Java EE 6 Goals • Easier to Use, Easier to Learn. Well, this is the usual stuff. What’s really new??? • Easier Extensibility - More ways to integrate frameworks. • Easier to Evolve - The size and wideness of the Java EE has made it difficult to evolve. Profiles and Pruning should take care of that. • SOA - Better support for SOA is also defined as a goal of the new spec. 5 copyright 2008 trainologic LTD
  • 11. Java EE 6 • Introduction. • New Concepts. • New Components. • Q&A. copyright 2008 trainologic LTD
  • 12. Java EE 6 Extensibility • During the lifetime of the Java EE platform, many frameworks has evolved. • Several of these frameworks became de-facto standards, like Struts and Facelets. • Integrating these frameworks with a Java EE application is a pain. • Java EE 6 plans to “relief” this pain. 7 copyright 2008 trainologic LTD
  • 13. Java EE 6 Extensibility • Java EE 6 Embraces the frameworks by supplying auto discovery of Servlets, Servlet Filters and Web Application Listeners. • These are all widely used integration point for known frameworks. • The Connector Architecture SPI is expected to change as well. 8 copyright 2008 trainologic LTD
  • 14. Java EE 6 Profiles • Java EE has became a huge platform. • Most Java EE projects do not use major part of the platform. • For example, there are many cases where EJBs are not in use while Servlets, Naming and JDBC are. • Profiles tries to focus the Java EE platform towards specific classes of applications. 9 copyright 2008 trainologic LTD
  • 15. Java EE 6 Profiles • “A profile is a configuration of the Java EE platform targeted at a specific class of applications.” the Java EE 6 Specification, early draft. • The idea is to identify typical uses of the platform and create a profile that includes only the parts of the platform which are relevant to the typical use. 10 copyright 2008 trainologic LTD
  • 16. Java EE 6 Profiles • So... is a profile just a bundle of Java EE sub specifications? • No, each profile must include the minimum set of mandatory components and may add some other components which are not part of Java EE. • Moreover, a profile must implement the special interactions between the different components, like dependency injection. 11 copyright 2008 trainologic LTD
  • 17. Java EE 6 Profiles • Each profile is defined by the JCP as a separate JSR. • The first profile is already defined by the Java EE 6 spec: The Web Profile. • You have guessed correctly, it is for web applications. 12 copyright 2008 trainologic LTD
  • 18. Java EE 6 Pruning • As the Java EE platform is getting older, it is carrying some pre-historic creatures like EJB Entity Beans on its back. • A process called pruning is starting with Java EE 6. • Marking a component as pruned, means it is candidate to become optional. • Pruning is marked in the JavaDoc. 13 copyright 2008 trainologic LTD
  • 19. Java EE 6 Pruning • A component marked pruned at the current version may become optional in the next version. • It is for the comity of the next version to decide it the component becomes optional or not. • Current Pruning list: JAX-RPC - Replaced by JAX-WS. • EJB Entity Beans - Replaced by JPA. • JAXR - API for XML Registries, never widely adopted. • JSR 88 - Deployment API, never widely adopted. • 14 copyright 2008 trainologic LTD
  • 20. Java EE 6 • Introduction. • New Concepts. • New Components. • Q&A. copyright 2008 trainologic LTD
  • 21. Java EE 6 New Components • EJB 3.1 • JAXB 2.2 • JPA 2.0 • JAX-WS 2.2 • Servlets 3.0 • EL 1.2 • JSF 2.0 • JSP 2.1 • JAX-RS 1.0 • Authentication SPI • JCA 1.6 • Concurrency Utilities • Web Beans 1.0 • Bean Validation 1.0 16 copyright 2008 trainologic LTD
  • 22. Java EE 6 New Components • As you can see, there is a long list of components. • We will explore the most popular ones: EJB • JPA • Servlets • JSF • 17 copyright 2008 trainologic LTD
  • 23. Java EE 6 EJB 3.1 • Stage: Public Review. • The long waited Singleton bean has arrived. • No Object Interface required. • Asynchronous business methods. • Standard global JNDI name: java:global/app/module/bean#interface • 18 copyright 2008 trainologic LTD
  • 24. Java EE 6 EJB 3.1 - Singleton • Up to version 3.1 there was no easy way to share data throughout the application. • The EJB 3.1 Singleton is an Application wide Singleton. • Concurrency can be managed either by the container or by the Bean Developer. • Container Managed Concurrency enables Read/Write Lock using annotations. 19 copyright 2008 trainologic LTD
  • 25. Java EE 6 EJB 3.1 - Singleton @Singleton public class DiscountRateBean { @PersistenceContext private EntityManager entityManager; private Rate rate; @PostConstruct private void init() { rate = entityManager.find(Rate.class, 1); } @ConcurrencyAttribute(READ_WRITE_LOCK) public void setRate(Rate rate) { this.rate = rate; } @ConcurrencyAttribute(READ_LOCK) public Rate getRate() { return rate; } } 20 copyright 2008 trainologic LTD
  • 26. Java EE 6 EJB 3.1 - Asynchronous • In Java EE there is a rule in the specification forbidding the developer from opening new threads. • The “correct” way to perform asynchronous operations in Java EE is using JMS. This is quite cumbersome... • EJB 3.1 solves this problem by presenting the new asynchronous method calls in session beans. • Since the method returns before creating the return value, it can either be void or return a Future. 21 copyright 2008 trainologic LTD
  • 27. Java EE 6 EJB 3.1 - Asynchronous @Stateless public class OrderBillingServiceBean implements OrderBillingService { ... @Asynchronous public Future<OrderStatus> billOrder(Order order) { try { // Attempt to charge the order. bill(order); return new AsyncResult<OrderStatus>(OrderStatus.COMPLETE); } catch (BillingException be) { // Send email notification of billing failure. notifyBillingFailure(be, order); return new AsyncResult<OrderStatus> (OrderStatus.BILLING_FAILED); } } } 22 copyright 2008 trainologic LTD
  • 28. Java EE 6 EJB 3.1 - Lite • EJBs outside of the container. • Subset of EJB 3.1 • Embeddable container API. • Bootstrap on Java SE. 23 copyright 2008 trainologic LTD
  • 29. Java EE 6 EJB 3.1 - Lite 24 copyright 2008 trainologic LTD
  • 30. Java EE 6 JPA 2.0 • More sophisticated mapping options: Access control in the property/field level. • Orphan Removal. • • Order Columns. • Persisting non-entity collections. 25 copyright 2008 trainologic LTD
  • 31. Java EE 6 JPA 2.0 • Relationships in embeddable objects. • Unidirectional one to many with foreign key. • Criteria API for Querying. • Validation by JSR 303. 26 copyright 2008 trainologic LTD
  • 32. Java EE 6 Servlets 3.0 • Stage: Public Review. • Annotation based configuration. • Auto-discovery of Servlets, Filters and Listeners. • Modular web.xml. • Asynchronous Support. • Authentication API. • HTTP-Only Cookies. 27 copyright 2008 trainologic LTD
  • 33. Java EE 6 Servlets 3.0 - Annotations • Like in EJB, deployment descriptors becomes completely optional in Servlets 3.0 • All configuration can be defined using annotations. • In case annotations and xml co-exist, the data in the xml takes precedence over the data in the annotations. 28 copyright 2008 trainologic LTD
  • 34. Java EE 6 Servlets 3.0 - Annotations @Servlet(urlMappings={quot;/MyAppquot;}) public class MyServlet { @GET public void handleGet(HttpServletRequest req, HttpServletResponse res) { .... } } 29 copyright 2008 trainologic LTD
  • 35. Java EE 6 Servlets 3.0 - Asynchronous Invocation • Sometimes we need to perform a long running blocking operation as a part of a Servlet request. • Performing this kind of operation from the thread running the servlet code is not efficient. • This can cause a starvation in cases this operation common. • Asynchronous Invocation solves this problem by releasing the original thread and passing the control to another thread. 30 copyright 2008 trainologic LTD
  • 36. Java EE 6 Servlets 3.0 - Asynchronous Invocation @WebServlet(quot;/fooquot; asyncSupported=true) public class MyServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) { ... AsyncContext aCtx = request.startAsync(req, res); ScheduledThreadPoolExecutor executor = new ThreadPoolExecutor(10); executor.execute(new AsyncWebService(aCtx)); } } 31 copyright 2008 trainologic LTD
  • 37. Java EE 6 Servlets 3.0 - Asynchronous Invocation public class AsyncWebService implements Runnable { AsyncContext ctx; public AsyncWebService(AsyncContext ctx) { this.ctx = ctx; } public void run() { // Invoke web service and save result in request attribute // Forward the request to render the result to a JSP. ctx.forward(quot;/render.jspquot;); } } 32 copyright 2008 trainologic LTD
  • 38. Java EE 6 JSF 2.0 • Stage: Public Review. • ProjectStage, did anybody say ROR? The value is set using JNDI or Context parameter. • Can be one of Production, Development, UnitTest, • SystemTest or Extension. Then you can query for the stage using: • Application.getProjectStage() 33 copyright 2008 trainologic LTD
  • 39. Java EE 6 JSF 2.0 • Better Resource management for components. • Resource re-location. • Both of these features enables component authors to load their own resources like css, js scrips, images and other resources. 34 copyright 2008 trainologic LTD
  • 40. Java EE 6 JSF 2.0 • Enhanced flexible event mechanism. • New Scope: View. • Full Ajax support including partial processing and js Library. • Facelets. 35 copyright 2008 trainologic LTD
  • 41. Thank You Q&A Gal Marder, CEO, Trainologic LTD copyright 2008 trainologic LTD