SlideShare a Scribd company logo
1 of 80
Download to read offline
What's new in Java EE 6 ?

Antonio Goncalves
Overall presentation


Focuses on news features of Java EE 6
     You must know Java EE 5

         28 specifications
        Thousands of pages
        Tough presentation
Agenda
●   Quick overview
●   New concepts
●   New features on existing specifications
●   New specifications
●   Summary
Antonio Goncalves
●   Freelance software architect
●   Former BEA consultant
●   Author (Java EE 5 and Java EE 6)
●   JCP expert member
●   Co-leader of the Paris JUG
●   Les Cast Codeurs podcast
●   Java Champion
●   antonio dot goncalves at gmail dot com
Agenda
●   Quick overview
●   New concepts
●   New features on existing specifications
●   New specifications
●   Summary
A brief history
Zooming in Java EE 6
Web                          Enterprise       Web Services
JSF          2.0             EJB        3.1   JAX-RPC           1.1
Servlet      3.0             JAF        1.1   JAXM              1.0
JSP          2.2             JavaMail   1.4   JAX-RS            1.1
EL           2.2             JCA        1.6   JAXR              1.0
JSTL         1.2             JMS        1.1   Web Services      1.3
Debugging    1.0             JPA        2.0   WS Metadata       2.0
   Support                   JTA        1.1

                                              + Java SE 6
Management, Security,                         JAX-WS      2.2
Common                                        JAXB        2.2
CDI (JSR 299)                    1.0          JDBC        4.0
@Inject (JSR 330)                1.0          JNDI        1.5
Bean Validation                  1.0          SAAJ        1.3
Interceptors                     1.1          Common      1.1
Managed Beans                    1.0            Annotations
JACC                             1.4          RMI
Java EE Application Deployment   1.2          Java IDL
Java EE Management               1.1          JMX
JASPIC                           1.0          JAAS
                                              JAXP
                                              StAX
Agenda
●   Quick overview
●   New concepts
    ●   Pruning, Profiles, EJB Lite, Portable JNDI names,
        Managed Beans, Interceptors 1.1
●   New features on existing specifications
●   New specifications
●   Summary
Pruning (Soon less specs)
●   Marks specifications optional in next version
●   Pruned in Java EE 6
    ●   Entity CMP 2.x
    ●   JAX-RPC
    ●   JAX-R
    ●   JSR 88 (Java EE Application Deployment)
●   Might disappear from Java EE 7
    ●   Vendors may decide to keeps them...
    ●   … or offer the delta as a set of modules
Profiles

      Full Java EE 6

                   Profile X

Web Profile


                           Profile Y
Web Profile 1.0
●   Subset of full platform       JSF             2.0
                                  Servlet         3.0
●   For web development           JSP             2.2
                                  EL              2.2
    ●   Packages in a war         JSTL            1.2
                                  EJB Lite        3.1
●   Separate specification        Managed Beans 1.0
●   Evolves at its own pace       Interceptors    1.1
                                  JTA             1.1
●   Others will come              JPA             2.0
                                  Bean Validation 1.0
    ●   Minimal (Servlet/JSP)     CDI             1.0
                                  @Inject         1.0
    ●   Portal....
EJB Lite
●   Subset of the EJB 3.1 API
●   Used in Web profile
●   Packaged in a war

     Local Session Bean    Message Driven Beans
     Injection             EJB Web Service Endpoint
     CMT / BMT             RMI/IIOP Interoperability
     Interceptors          Remote interface
     Security              EJB 2.x
                           Timer service
                           CMP / BMP
Portable JNDI names
●   Client inside a container (use DI)
     @EJB Hello h;

●   Client outside a container
     Context ctx = new InitialContext();
     Hello h = (Hello) ctx.lookup(xyz);

●   Portable JNDI name is specified
     java:global/foo/bar/HelloEJB
Portable JNDI names
●   OrderBean implements Order packaged in
    orderejb.jar within orderapp.ear
●   java:global/orderapp/orderejb/OrderBean
    java:global/orderapp/orderejb/OrderBean!
    org.foo.Order
                       Usable from any application in the container


●   java:app/orderejb/OrderBean
    java:app/orderejb/OrderBean!com.acme.Order
                                            Fully-qualified interface name

●   java:module/OrderBean java:module/OrderBean!
    org.foo.Order
Managed Beans 1.0
●   Separate spec shipped with Java EE 6
●   Container-managed POJOs
●   Support a small set of basic services
    ●   Injection (@Resource...)
    ●   Life-cycle (@PostConstruct, @PreDestroy)
    ●   Interceptor (@Interceptor, @AroundInvoke)
●   Lightweight component model
Managed Beans 1.0
@javax.annotation.ManagedBean
public class MyPojo {

    @Resource
    private Datasource ds;

    @PostConstruct
    private void init() {
      ....
    }

    @Interceptors(LoggingInterceptor.class)
    public void myMethod() {...}
}
Interceptors 1.1
●   Address cross-cutting concerns in Java EE
●   Were part of the EJB 3.0 spec
●   Now a seperate spec shipped with EJB 3.1
●   Can be uses in EJBs...
●   … as well as ManagedBeans
●   @AroundInvoke
●   @AroundTimeout for EJB timers
Agenda
●   Quick overview
●   New concepts
●   New features on existing specifications
    ●   JPA 2.0, EJB 3.1, Servlet 3.0, JSF 2.0
●   New specifications
●   Summary
JPA 2.0
●   Evolves separately from EJB now
    ●     JSR 317
●   Richer mappings
●   Richer JPQL
●   Standard config options
●   Criteria API
●   ...
Richer mapping
●   Collection of embeddables and basic types
    ●   Not just collection of JPA entities
    ●   Multiple levels of embeddables
●   More flexible support for Maps
    ●   Keys, values can be one of : entities, embeddables
          or basic types
●   More relationship mapping options
    ●   Unidirectional 1-many foreign key mappings
Collections of Embeddable Types
@Embeddable public class BookReference {
   String title;
   Float price;
   String description;
   String isbn;
   Integer nbOfPage;
   ...
}

@Entity public class ListOfGreatBooks {
   @ElementCollection
   protected Set<BookReference> javaBooks;
   @ElementCollection
   protected Set<String> tags;
   ...
}
Richer JPQL
●   Added entity type to support non-polymorphic
     queries
●   Allow joins in subquery FROM clause
●   Added new reserved words
    ●   ABS, BOTH, CONCAT, ELSE, END, ESCAPE,
        LEADING, LENGTH, LOCATE, SET, SIZE, SQRT,
        SUBSTRING, TRAILING
Criteria API
●   Strongly typed criteria API
●   Object-based query definition objects
    ●   (Rather than JPQL string-based)
●   Operates on the meta-model
    ●   Browse the structure of a Persistence Unit
    ●   Dynamically: EntityManager.getMetamodel()
    ●   Statically:
          Each entity X has a metamodel class X_
●   CriteriaQuery as a query graph
Criteria API
EntityManager em = ...;
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Book> query =
                     cb.createQuery(Book.class);
Root<Book> book = query.from(Book.class);
query.select(book)
     .where(cb.equal(book.get("description"), ""));




SELECT b
FROM Book b
WHERE b.description IS EMPTY
Criteria API (Type-safe)
EntityManager em = ...;
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Book> query =
                     cb.createQuery(Book.class);
Root<Book> book = query.from(Book.class);


query.select(book)
     .where(cb.isEmpty(book.get(Book_.description)));




                                            Statically generated
                                            JPA 2.0 MetaModel
Criteria API (Builder pattern)
EntityManager em = ...;
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Book> query =
                     cb.createQuery(Book.class);

Root<Book> book = query.from(Book.class);

query.select(book)
     .where(cb.isEmpty(book.get(Book_.description)))
     .orderBy(...)
     .distinct(true)
     .having(...)
     .groupBy(...);

List<Book> books =
             em.createQuery(query).getResultList();
Standard properties
●   In persistence.xml :

    ●   javax.persistence.jdbc.driver
    ●   javax.persistence.jdbc.url
    ●   javax.persistence.jdbc.user
    ●   javax.persistence.jdbc.password
    ●   javax.persistence.lock.scope
    ●   javax.persistence.lock.timeout
And more...
●   detach()
●   Join<X,Y>, ListJoin, MapJoin
●   Orphan removal functionality
    ●   @OneToMany(orphanRemoval=true)
●   BeanValidation integration on lifecycle
●   Second-level cache API
    ●   @Cacheable annotation on entities
    ●   contain(Class,PK), evict(Class,PK), ...
●   Pessimistic locking
Servlet 3.0
●   Ease of development
●   Pluggability
●   Asynchronous support
Ease of development
●   Annotations based programming model
    ●   @WebServlet
    ●   @WebFilter
    ●   @WebListener
    ●   @WebInitParam
●   Optional web.xml
●   Better defaults and CoC
A servlet 3.0 example
@WebServlet(urlPatterns={"/MyApp"})
public class MyServlet extends HttpServlet {

     public void doGet (HttpServletRequest req,
                        HttpServletResponse res){
                 ....
     }
}
                                   web.xml is optional


●   Same for @WebFilter
        and @WebListener
Pluggability
●   Fragments are similar to web.xml
●   <web-fragment> instead of <web-app>
    ●   Declare their own servlets, listeners and filters
●   Annotations and web fragments are merged
     following a configurable order
●   JARs need to be placed in WEB-INF/lib
●   and use /META-INF/web-fragment.xml
●   Overridden by main web.xml
And more...
●   Async support (Comet-style)
●   Static resources in META-INF/resources
●   Configuration API
    ●   Add and configure Servlet, Filters, Listeners
    ●   Add security constraints
    ●   Using ServletContext API
●   File upload (similar to Apache File Upload)
●   Configure cookie session name
●   Security with @ServletSecurity
EJB 3.1
●   Optional local interface
●   Packaging in a war
●   Asynchronous calls
●   Timer service
●   Singleton
●   Embeddable container
Optional Local Interface
●   @Local, @Remote
●   Interfaces are not always needed
    ●    Only for local interfaces
    ●    Remote interfaces are now optional !

     @Stateless
     public class HelloBean {

         public String sayHello() {
           return "Hello world!";
         }
     }
Packaging in a war
        foo.ear                          foo.war
lib/foo_common.jar              WEB-INF/classes
                                  com/acme/Foo.class
com/acme/Foo.class
                                  com/acme/FooServlet.class
                                  com/acme/FooEJB.class
foo_web.war
WEB-INF/web.xml
WEB-INF/classes
    com/acme/FooServlet.class


foo_ejb.jar
com/acme/FooEJB.class
com/acme/FooEJBLocal.class
Asynchronous calls
●   How to have asynchronous call in EJBs ?
    ●   JMS is more about sending messages
    ●   Threads and EJB's don't integrate well
●   @Asynchronous
    ●   Applicable to any EJB type
    ●   Best effort, no delivery guarantee
●   Method returns void or Future<T>
    ●   javax.ejb.AsyncResult helper class :
        return new AsyncResult<int>(result)
Asynchronous calls
@Stateless
public class OrderBean {

    public void createOrder() {
      Order order = persistOrder();
      sendEmail(order); // fire and forget
    }

    public Order persistOrder() {...}

    @Asynchronous
    public void sendEmail(Order order) {...}
}
Timer Service
●   Programmatic and Calendar based scheduling
    ●   « Last day of the month »
    ●   « Every five minutes on Monday and Friday »

●   Cron-like syntax
    ●   second [0..59], minute[0..59], hour[0..23]...
    ●   dayOfMonth[1..31]
    ●   dayOfWeek[0..7] or [sun, mon, tue..]
    ●   Month[0..12] or [jan,feb..]
Timer Service
@Stateless
public class WakeUpBean {

    @Schedule(dayOfWeek="Mon-Fri", hour="9")
    void wakeUp() {
      ...
    }
}
Singleton
●   New component
    ●   No/local/remote interface
●   Follows the Singleton pattern
    ●   One single EJB per application per JVM
●   Used to share state in the entire application
    ●   State not preserved after container shutdown
●   Added concurrency management
    ●   Default is single-threaded
    ●   @ConcurrencyManagement
Singleton
@Singleton
public class CachingBean {

    private Map cache;

    @PostConstruct void init() {
      cache = ...;
    }

    public Map getCache() {
      return cache;
    }

    public void addToCache(Object key, Object val) {
      cache.put(key, val);
    }
}
Embeddable Container
●   API allowing to :                  EJB 3.1 Embedded container
                                   Transaction   Security   Messaging
    ●   Initialize a container       manager      system     engine

    ●   Get container ctx                        Java SE

    ●   …

●   Can run in any Java SE environment
    ●   Batch processing
    ●   Simplifies testing
    ●   Just a jar file in your classpath
Embeddable Container
public static void main(String[] args){

    EJBContainer container =
          EJBContainer.createEJBContainer();

    Context context = container.getContext();

    Hello h = (Hello)context.lookup("Global_JNDI_Name");

    h.sayHello();

    container.close();
}
And more...
●   Interceptors and InterceptorBinding
●   Singletons can be chained
●   Non persistent timer
●   @StatefulTimeout
●   ...
JSF 2.0
●   The standard component-oriented MVC framework
●   Part of Java EE 5
●   Part of Java EE 6 and Web Profile
    ●   Other frameworks can rely on EE 6 extensibility
●   Deserves its 2.0 version number
    ●   New features, issues fixed, performance focus
●   Fully available today in Mojarra 2.0.2
    ●   Production-quality implementation
    ●   Part of GlassFish v3
Facelets now preferred VDL
●   Facelets (XHTML) as alternative to JSP
    ●   Based on a generic View Description Language
        (VDL)
    ●   Can't add Java code to XHTML page
        (and “that's a good thing!”™)
●   Pages are usable from basic editors
●   IDEs offer traditional value-add:
    ●   Auto-completion (EL)
    ●   (Composite) Component management
    ●   Project management, testing, etc...
Setup, configuration
●   JSF 2.0 does not mandate Servlet 3.0
    ●   Servlet 2.5 containers will run JSF 2.0
    ●   web.xml may be optional depending on runtime

●   faces-config.xml now optional
    ●   @javax.faces.bean.ManagedBean
    ●   Not required with JSR 299
    ●   Navigation can now belong to the page
        (<navigation-rules> become optional)
JSF Composite Component
●   Using JSF 1.x
     ●   Implement UIComponent, markup in renderer, register in
         faces-config.xml, add tld, ...
●   With JSF 2.0
     ●   Single file, no Java code needed
     ●   Use XHTML and JSF tags to create components
    <html xmlns:cc="http://java.sun.com/jsf/composite">
    <cc:interface>
      <cc:attribute ...>
    <cc:implementation>
     ●   Everything else is auto-wired
/resources/ezcomp/mycomponent.xhtml
                                                                                   Naming the
                                                                                   component
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:composite="http://java.sun.com/jsf/composite">                         Defining the
    <!-- INTERFACE -->
    <composite:interface>
                                                                                   component
        <composite:attribute name="param"/>                 Implicit   EL object
    </composite:interface>
    <!-- IMPLEMENTATION -->
    <composite:implementation>
        <h:outputText value="Hello there, #{cc.attrs.param}"/>
    </composite:implementation>
</html>


                      <?xml version='1.0' encoding='UTF-8' ?>
                      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                      <html xmlns="http://www.w3.org/1999/xhtml"
                            xmlns:h="http://java.sun.com/jsf/html"
    Using the               xmlns:custom="http://java.sun.com/jsf/composite/ezcomp">
                          <h:body>
   component                  <custom:mycomponent param="Java EE 6 attendees"/>
                          </h:body>
                      </html>
Ajax support
●    Inspired by RichFaces, IceFaces, DynaFaces, ...
●    Common JavaScript library (jsf.js)
     ●   request JavaScript functions captured by
         PartialViewContext for sub-tree processing
     ●   Client JavaScript updates the DOM
    <h:commandButton
       onclick="jsf.ajax.request(this,event,{render:'foo'});
                  return false;"/>

●    <f:ajax> tag to ajaxify existing pages
    xmlns:f="http://java.sun.com/jsf/core"
    <h:commandButton>
      <f:ajax event="change" execute="myForm" render="foo" />
    </h:commandButton>
And more...
●   Validation delegated to BeanValidation
●   Easier resources management
●   Better error reporting
●   New managed bean scope (View)
●   Groovy support (Mojarra)
●   Bookmarkable URLs
●   Templating : define and apply layouts
●   Project stages (dev vs. test vs. production)
●   ...
Agenda
●   Quick overview
●   New concepts
●   New features on existing specifications
●   New specifications
    ●   Bean Validation, JAX-RS, @Inject, CDI
●   Summary
Bean Validation 1.0
●   Enable declarative validation in your
     applications
●   Constrain Once, Validate Anywhere
    ●   restriction on a bean, field or property
    ●   not null, size between 1 and 7, valid email...
●   Standard way to validate constraints
●   Integration with JPA 2.0 & JSF 2.0
Bean Validation 1.0
public class Address {
  @NotNull @Size(max=30,
       message="longer than {max} characters")
  private String street1;
  ...
  @NotNull @Valid
  private Country country;
}

public class Country {
  @NotNull @Size(max=20)    request recursive
  private String name;      object graph
  ...                       validation
}
Build your own!
@Size(min=5, max=5)
@ConstraintValidator(ZipcodeValidator.class)
@Documented
@Target({ANNOTATION_TYPE, METHOD, FIELD})
@Retention(RUNTIME)
public @interface ZipCode {
    String message() default "Wrong zipcode";
    String[] groups() default {};
}
Integration with JPA 2.0 and JSF 2.0
●   Automatic
●   No extra code
●   Happens during @PrePersist, @PreUpdate,
    @PreRemove
●   Shows how well integrated EE can be
And more...
●   Group subsets of constraints
●   Partial validation
●   Order constraint validations
●   Create your own
●   Bootstrap API
●   Messages can be i18n
●   ...
JAX-RS 1.1
●   High-level HTTP API for RESTful Services
●   POJO and Annotations Based
    ●   API also available
●   Maps HTTP verbs (Get, Post, Put, Delete...)
●   JAX-RS 1.0 has been released in 2008
●   JAX-RS 1.1 integrates with EJBs
      (and more generally with Java EE 6)
Hello World
@Path("/helloworld")
public class HelloWorldResource {

    @GET
    @Produces("text/plain")
    public String sayHello() {
      return "Hello World";
    }
}
             GET http://example.com/helloworld
Hello World

Request
     GET /helloworld HTTP/1.1
     Host: example.com
     Accept: text/plain
Response
     HTTP/1.1 200 OK
     Date: Wed, 12 Nov 2008 16:41:58 GMT
     Server: GlassFish v3
     Content-Type: text/plain; charset=UTF-8
     Hello World
Different Mime Types
@Path("/helloworld")
public class HelloWorldResource {

    @GET @Produces("image/jpeg")
    public byte[] paintHello() {
    ...
    @GET @Produces("text/plain")
    public String displayHello() {
    ...
    @POST @Consumes("text/xml")
    public void updateHello(String xml) {
    ...
}
Parameters & EJBs
@Path("/users/{userId}")
@Stateless
public class UserResource {

    @PersistenceContext
    EntityManage em;

    @GET @Produces("text/xml")
    public String getUser(@PathParam("userId")
                                    String id){

        User u = em.find(User.class, id)
        ...
    }
}
And more...
●   Different parameters (@MatrixParam,
      @QueryParam, @CookieParam ...)
●   Support for @Head and @Option
●   Inject UriInfo using @Context
●   JAX-RS servlet mapping with
      @ApplicationPath("rs")
●   ...
Injection in Java EE 5
●   Common Annotation
    ●   @Resource
●   Specialized cases
    ●   @EJB, @WebServicesRef,
        @PersistenceUnit …
●   Requires managed objects
    ●   EJB, Servlet and JSF Managed Bean in EE 5
    ●   Also in any Java EE 6's
        javax.annotation.ManagedBean
Injection in Java EE 6


          CDI (JSR 299)
                 &
         @Inject (JSR 330)

Inject just about anything anywhere...
       ...yet with strong typing
The tale of 2 dependency JSRs
●   Context & Dependency Injection for Java EE
    ●   Born as WebBeans, unification of JSF and EJB
    ●   “Loose coupling, strong typing"
    ●   Weld as the reference implementation, others to follow
        (Caucho, Apache)
●   Dependency Injection for Java (JSR 330)
    ●   Lead by Google and SpringSource
    ●   Minimalistic dependency injection, @Inject
    ●   Applies to Java SE, Guice as the reference impl.

●   Both aligned and part of Java EE 6 Web Profile
@Inject
●   javax.inject package
●   @Inject : Identifies injectable constructors,
     methods, and fields
●   @Named : String-based qualifier (for EL)
●   @Qualifier : Identifies qualifier
●   @Scope : Identifies scope annotations
●   @Singleton : Instantiates once
Injection




@Inject Customer cust;



   injection point     type
Qualifier Annotation
@Target({TYPE,METHOD,PARAMETER,FIELD})
@Retention(RUNTIME)
@Documented
@Qualifier
public @interface Premium {…}



@Premium // my own qualifier (see above)
public class SpecialCustomer
                implements Customer {
    public void buy() {…}
}
Injection with qualifier

        qualifier (user-defined label)
                   i.e. « which one? »

@Inject @Premium Customer cust;



    injection point                type
Contexts (The 'C' in CDI)
●   Built-in “Web” Scopes :
    ●   @RequestScoped                   *: requires Serializable
                                         fields to enable passivation
    ●   @SessionScoped*
    ●   @ApplicationScoped*
    ●   @ConversationScoped*
●   Other Scopes
    ●   @Dependent is the default pseudo-scope for
        un-scoped beans (same as Managed Beans)
    ●   Build your own @ScopeType
●   Clients need not be scope-aware
@ConversationScoped
●   A conversation is :
    ●   explicitly demarcated
    ●   associated with individual browser tabs
    ●   accessible from any JSF request
@Named
@ConversationScoped
public class ItemFacade implements Serializable {
  @Inject Conversation conversation;
  ...
  conversation.begin(); // long-running
  ...
  conversation.end();   // schedule for destruction
And more...
●   Alternatives
    ●   @Alternative annotation on various impl.
●   Interceptors & Decorators
    ●   Loosely-coupled orthogonal (technical) interceptors
    ●   @Decorator bound to given interface
●   Stereotypes (@Stereotype)
    ●   Captures any of the above common patterns
●   Events
    ●   Loosely-coupled (conditional) @Observable events
Agenda
●   Quick overview
●   New concepts
●   New features on existing specifications
●   New specifications
●   Summary
Java EE 6 is...



   Richer
   Ligther
   Simpler
Application servers are...



   Less monolithic
  More OSGi based
Ready for other profiles
Time is changing




Java EE 6 and GlassFish v3 shipped
                             th
final releases on December 10 2009
Want to know more ?
●   Covers most specs
●   450 pages about Java EE 6



    “The best book ever !” – my sister
    “Nice photo at the back” – my mum
    “Plenty of pages to draw on” – my daughter
Thanks for your attention!




       Q&A

More Related Content

What's hot

Ejb 3.0 Runtime Environment
Ejb 3.0 Runtime EnvironmentEjb 3.0 Runtime Environment
Ejb 3.0 Runtime Environmentrradhak
 
Glassfish Overview Fontys 20090520
Glassfish Overview Fontys 20090520Glassfish Overview Fontys 20090520
Glassfish Overview Fontys 20090520Eugene Bogaart
 
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
 
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 2010Arun Gupta
 
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013Arun Gupta
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New EvolutionAllan Huang
 
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.
 
Clojure Fundamentals Course For Beginners
Clojure Fundamentals Course For Beginners Clojure Fundamentals Course For Beginners
Clojure Fundamentals Course For Beginners Paddy Lock
 
Spring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationSpring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationsourabh aggarwal
 
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 = 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
 
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 ?Sanjeeb Sahoo
 
Java Future S Ritter
Java Future S RitterJava Future S Ritter
Java Future S Rittercatherinewall
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Ryan Cuprak
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkMohit Belwal
 

What's hot (20)

Ejb 3.0 Runtime Environment
Ejb 3.0 Runtime EnvironmentEjb 3.0 Runtime Environment
Ejb 3.0 Runtime Environment
 
Glassfish Overview Fontys 20090520
Glassfish Overview Fontys 20090520Glassfish Overview Fontys 20090520
Glassfish Overview Fontys 20090520
 
Java Programming - 01 intro to java
Java Programming - 01 intro to javaJava Programming - 01 intro to java
Java Programming - 01 intro to java
 
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
 
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
 
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
 
Spring frame work
Spring frame workSpring frame work
Spring frame work
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
 
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
 
Advance Java
Advance JavaAdvance Java
Advance Java
 
Clojure Fundamentals Course For Beginners
Clojure Fundamentals Course For Beginners Clojure Fundamentals Course For Beginners
Clojure Fundamentals Course For Beginners
 
Spring 3 to 4
Spring 3 to 4Spring 3 to 4
Spring 3 to 4
 
Spring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationSpring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentation
 
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 = 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
 
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 ?
 
What's new in Java 11
What's new in Java 11What's new in Java 11
What's new in Java 11
 
Java Future S Ritter
Java Future S RitterJava Future S Ritter
Java Future S Ritter
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 

Viewers also liked

Lightweight AOP with CDI and JPA
Lightweight AOP with CDI and JPALightweight AOP with CDI and JPA
Lightweight AOP with CDI and JPAmh0708
 
Are app servers still fascinating
Are app servers still fascinatingAre app servers still fascinating
Are app servers still fascinatingAntonio Goncalves
 
Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)Hirofumi Iwasaki
 
Dependency Injection with CDI in 15 minutes
Dependency Injection with CDI in 15 minutesDependency Injection with CDI in 15 minutes
Dependency Injection with CDI in 15 minutesAntonio Goncalves
 
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...Hirofumi Iwasaki
 
Come and Play! with Java EE 7
Come and Play! with Java EE 7Come and Play! with Java EE 7
Come and Play! with Java EE 7Antonio Goncalves
 
Case Study of Financial Web System Development and Operations with Oracle Web...
Case Study of Financial Web System Development and Operations with Oracle Web...Case Study of Financial Web System Development and Operations with Oracle Web...
Case Study of Financial Web System Development and Operations with Oracle Web...Hirofumi Iwasaki
 
Java one 2015 [con3339]
Java one 2015 [con3339]Java one 2015 [con3339]
Java one 2015 [con3339]Arshal Ameen
 
50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutes50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutesAntonio Goncalves
 
Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Ray Ploski
 
Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7Hirofumi Iwasaki
 
IBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) ConceptIBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) Conceptejlp12
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introductionejlp12
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuseejlp12
 

Viewers also liked (18)

Lightweight AOP with CDI and JPA
Lightweight AOP with CDI and JPALightweight AOP with CDI and JPA
Lightweight AOP with CDI and JPA
 
Are app servers still fascinating
Are app servers still fascinatingAre app servers still fascinating
Are app servers still fascinating
 
Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)
 
Dependency Injection with CDI in 15 minutes
Dependency Injection with CDI in 15 minutesDependency Injection with CDI in 15 minutes
Dependency Injection with CDI in 15 minutes
 
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
 
Come and Play! with Java EE 7
Come and Play! with Java EE 7Come and Play! with Java EE 7
Come and Play! with Java EE 7
 
Case Study of Financial Web System Development and Operations with Oracle Web...
Case Study of Financial Web System Development and Operations with Oracle Web...Case Study of Financial Web System Development and Operations with Oracle Web...
Case Study of Financial Web System Development and Operations with Oracle Web...
 
CDI: How do I ?
CDI: How do I ?CDI: How do I ?
CDI: How do I ?
 
Move from J2EE to Java EE
Move from J2EE to Java EEMove from J2EE to Java EE
Move from J2EE to Java EE
 
Java one 2015 [con3339]
Java one 2015 [con3339]Java one 2015 [con3339]
Java one 2015 [con3339]
 
50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutes50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutes
 
Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6
 
Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7
 
Just enough app server
Just enough app serverJust enough app server
Just enough app server
 
Java EE 7 - Overview and Status
Java EE 7  - Overview and StatusJava EE 7  - Overview and Status
Java EE 7 - Overview and Status
 
IBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) ConceptIBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) Concept
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 

Similar to Whats New In Java Ee 6

The Java EE 6 platform
The Java EE 6 platformThe Java EE 6 platform
The Java EE 6 platformLorraine JUG
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Arun Gupta
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Agora Group
 
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
 
Deep Dive Hands-on in Java EE 6 - Oredev 2010
Deep Dive Hands-on in Java EE 6 - Oredev 2010Deep Dive Hands-on in Java EE 6 - Oredev 2010
Deep Dive Hands-on in Java EE 6 - Oredev 2010Arun Gupta
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Arun Gupta
 
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
 
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
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGMarakana Inc.
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Rohit Kelapure
 
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
 
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 PowerArun Gupta
 
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 @ DevIgnitionArun Gupta
 
S313557 java ee_programming_model_explained_dochez
S313557 java ee_programming_model_explained_dochezS313557 java ee_programming_model_explained_dochez
S313557 java ee_programming_model_explained_dochezJerome Dochez
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Arun Gupta
 
OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6glassfish
 
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
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusArun Gupta
 

Similar to Whats New In Java Ee 6 (20)

The Java EE 6 platform
The Java EE 6 platformThe Java EE 6 platform
The Java EE 6 platform
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011
 
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
 
Deep Dive Hands-on in Java EE 6 - Oredev 2010
Deep Dive Hands-on in Java EE 6 - Oredev 2010Deep Dive Hands-on in Java EE 6 - Oredev 2010
Deep Dive Hands-on in Java EE 6 - Oredev 2010
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
 
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
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010
 
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
 
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 @ 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
 
Glass Fishv3 March2010
Glass Fishv3 March2010Glass Fishv3 March2010
Glass Fishv3 March2010
 
S313557 java ee_programming_model_explained_dochez
S313557 java ee_programming_model_explained_dochezS313557 java ee_programming_model_explained_dochez
S313557 java ee_programming_model_explained_dochez
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
 
OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6
 
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...
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexus
 

More from Stephan Janssen

Devoxx speaker training (June 27th, 2018)
Devoxx speaker training (June 27th, 2018)Devoxx speaker training (June 27th, 2018)
Devoxx speaker training (June 27th, 2018)Stephan Janssen
 
The new DeVoxxEd websites with JHipster, Angular & Kubernetes
The new DeVoxxEd websites with JHipster, Angular & KubernetesThe new DeVoxxEd websites with JHipster, Angular & Kubernetes
The new DeVoxxEd websites with JHipster, Angular & KubernetesStephan Janssen
 
The new Voxxed websites with JHipster, Angular and GitLab
The new Voxxed websites  with JHipster, Angular and GitLabThe new Voxxed websites  with JHipster, Angular and GitLab
The new Voxxed websites with JHipster, Angular and GitLabStephan Janssen
 
Devoxx2011 timesheet day3-4-5
Devoxx2011 timesheet day3-4-5Devoxx2011 timesheet day3-4-5
Devoxx2011 timesheet day3-4-5Stephan Janssen
 
Devoxx2011 timesheet day1-2
Devoxx2011 timesheet day1-2Devoxx2011 timesheet day1-2
Devoxx2011 timesheet day1-2Stephan Janssen
 

More from Stephan Janssen (16)

Devoxx speaker training (June 27th, 2018)
Devoxx speaker training (June 27th, 2018)Devoxx speaker training (June 27th, 2018)
Devoxx speaker training (June 27th, 2018)
 
The new DeVoxxEd websites with JHipster, Angular & Kubernetes
The new DeVoxxEd websites with JHipster, Angular & KubernetesThe new DeVoxxEd websites with JHipster, Angular & Kubernetes
The new DeVoxxEd websites with JHipster, Angular & Kubernetes
 
The new Voxxed websites with JHipster, Angular and GitLab
The new Voxxed websites  with JHipster, Angular and GitLabThe new Voxxed websites  with JHipster, Angular and GitLab
The new Voxxed websites with JHipster, Angular and GitLab
 
Java, what's next?
Java, what's next?Java, what's next?
Java, what's next?
 
Programming 4 kids
Programming 4 kidsProgramming 4 kids
Programming 4 kids
 
Devoxx2011 timesheet day3-4-5
Devoxx2011 timesheet day3-4-5Devoxx2011 timesheet day3-4-5
Devoxx2011 timesheet day3-4-5
 
Devoxx2011 timesheet day1-2
Devoxx2011 timesheet day1-2Devoxx2011 timesheet day1-2
Devoxx2011 timesheet day1-2
 
EJB 3.1 by Bert Ertman
EJB 3.1 by Bert ErtmanEJB 3.1 by Bert Ertman
EJB 3.1 by Bert Ertman
 
BeJUG JAX-RS Event
BeJUG JAX-RS EventBeJUG JAX-RS Event
BeJUG JAX-RS Event
 
Advanced Scrum
Advanced ScrumAdvanced Scrum
Advanced Scrum
 
Scala by Luc Duponcheel
Scala by Luc DuponcheelScala by Luc Duponcheel
Scala by Luc Duponcheel
 
Intro To OSGi
Intro To OSGiIntro To OSGi
Intro To OSGi
 
Kick Start Jpa
Kick Start JpaKick Start Jpa
Kick Start Jpa
 
BeJUG - Di With Spring
BeJUG - Di With SpringBeJUG - Di With Spring
BeJUG - Di With Spring
 
BeJUG - Spring 3 talk
BeJUG - Spring 3 talkBeJUG - Spring 3 talk
BeJUG - Spring 3 talk
 
BeJug.Org Java Generics
BeJug.Org   Java GenericsBeJug.Org   Java Generics
BeJug.Org Java Generics
 

Recently uploaded

Entrepreneurship lessons in Philippines
Entrepreneurship lessons in  PhilippinesEntrepreneurship lessons in  Philippines
Entrepreneurship lessons in PhilippinesDavidSamuel525586
 
WSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdfWSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdfJamesConcepcion7
 
TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024Adnet Communications
 
Technical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamTechnical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamArik Fletcher
 
Onemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring CapabilitiesOnemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring CapabilitiesOne Monitar
 
digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingrajputmeenakshi733
 
Introducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsIntroducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsKnowledgeSeed
 
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdfGUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdfDanny Diep To
 
Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Americas Got Grants
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxmbikashkanyari
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Anamaria Contreras
 
Cyber Security Training in Office Environment
Cyber Security Training in Office EnvironmentCyber Security Training in Office Environment
Cyber Security Training in Office Environmentelijahj01012
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfShashank Mehta
 
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...ssuserf63bd7
 
business environment micro environment macro environment.pptx
business environment micro environment macro environment.pptxbusiness environment micro environment macro environment.pptx
business environment micro environment macro environment.pptxShruti Mittal
 
Welding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsWelding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsIndiaMART InterMESH Limited
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfRbc Rbcua
 
Pitch Deck Teardown: Xpanceo's $40M Seed deck
Pitch Deck Teardown: Xpanceo's $40M Seed deckPitch Deck Teardown: Xpanceo's $40M Seed deck
Pitch Deck Teardown: Xpanceo's $40M Seed deckHajeJanKamps
 
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...Hector Del Castillo, CPM, CPMM
 

Recently uploaded (20)

Entrepreneurship lessons in Philippines
Entrepreneurship lessons in  PhilippinesEntrepreneurship lessons in  Philippines
Entrepreneurship lessons in Philippines
 
WSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdfWSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdf
 
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptxThe Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
 
TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024
 
Technical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamTechnical Leaders - Working with the Management Team
Technical Leaders - Working with the Management Team
 
Onemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring CapabilitiesOnemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
 
digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketing
 
Introducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsIntroducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applications
 
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdfGUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
 
Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.
 
Cyber Security Training in Office Environment
Cyber Security Training in Office EnvironmentCyber Security Training in Office Environment
Cyber Security Training in Office Environment
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdf
 
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
 
business environment micro environment macro environment.pptx
business environment micro environment macro environment.pptxbusiness environment micro environment macro environment.pptx
business environment micro environment macro environment.pptx
 
Welding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsWelding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan Dynamics
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdf
 
Pitch Deck Teardown: Xpanceo's $40M Seed deck
Pitch Deck Teardown: Xpanceo's $40M Seed deckPitch Deck Teardown: Xpanceo's $40M Seed deck
Pitch Deck Teardown: Xpanceo's $40M Seed deck
 
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
 

Whats New In Java Ee 6

  • 1. What's new in Java EE 6 ? Antonio Goncalves
  • 2. Overall presentation Focuses on news features of Java EE 6 You must know Java EE 5 28 specifications Thousands of pages Tough presentation
  • 3. Agenda ● Quick overview ● New concepts ● New features on existing specifications ● New specifications ● Summary
  • 4. Antonio Goncalves ● Freelance software architect ● Former BEA consultant ● Author (Java EE 5 and Java EE 6) ● JCP expert member ● Co-leader of the Paris JUG ● Les Cast Codeurs podcast ● Java Champion ● antonio dot goncalves at gmail dot com
  • 5. Agenda ● Quick overview ● New concepts ● New features on existing specifications ● New specifications ● Summary
  • 7. Zooming in Java EE 6 Web Enterprise Web Services JSF 2.0 EJB 3.1 JAX-RPC 1.1 Servlet 3.0 JAF 1.1 JAXM 1.0 JSP 2.2 JavaMail 1.4 JAX-RS 1.1 EL 2.2 JCA 1.6 JAXR 1.0 JSTL 1.2 JMS 1.1 Web Services 1.3 Debugging 1.0 JPA 2.0 WS Metadata 2.0 Support JTA 1.1 + Java SE 6 Management, Security, JAX-WS 2.2 Common JAXB 2.2 CDI (JSR 299) 1.0 JDBC 4.0 @Inject (JSR 330) 1.0 JNDI 1.5 Bean Validation 1.0 SAAJ 1.3 Interceptors 1.1 Common 1.1 Managed Beans 1.0 Annotations JACC 1.4 RMI Java EE Application Deployment 1.2 Java IDL Java EE Management 1.1 JMX JASPIC 1.0 JAAS JAXP StAX
  • 8. Agenda ● Quick overview ● New concepts ● Pruning, Profiles, EJB Lite, Portable JNDI names, Managed Beans, Interceptors 1.1 ● New features on existing specifications ● New specifications ● Summary
  • 9. Pruning (Soon less specs) ● Marks specifications optional in next version ● Pruned in Java EE 6 ● Entity CMP 2.x ● JAX-RPC ● JAX-R ● JSR 88 (Java EE Application Deployment) ● Might disappear from Java EE 7 ● Vendors may decide to keeps them... ● … or offer the delta as a set of modules
  • 10. Profiles Full Java EE 6 Profile X Web Profile Profile Y
  • 11. Web Profile 1.0 ● Subset of full platform JSF 2.0 Servlet 3.0 ● For web development JSP 2.2 EL 2.2 ● Packages in a war JSTL 1.2 EJB Lite 3.1 ● Separate specification Managed Beans 1.0 ● Evolves at its own pace Interceptors 1.1 JTA 1.1 ● Others will come JPA 2.0 Bean Validation 1.0 ● Minimal (Servlet/JSP) CDI 1.0 @Inject 1.0 ● Portal....
  • 12. EJB Lite ● Subset of the EJB 3.1 API ● Used in Web profile ● Packaged in a war Local Session Bean Message Driven Beans Injection EJB Web Service Endpoint CMT / BMT RMI/IIOP Interoperability Interceptors Remote interface Security EJB 2.x Timer service CMP / BMP
  • 13. Portable JNDI names ● Client inside a container (use DI) @EJB Hello h; ● Client outside a container Context ctx = new InitialContext(); Hello h = (Hello) ctx.lookup(xyz); ● Portable JNDI name is specified java:global/foo/bar/HelloEJB
  • 14. Portable JNDI names ● OrderBean implements Order packaged in orderejb.jar within orderapp.ear ● java:global/orderapp/orderejb/OrderBean java:global/orderapp/orderejb/OrderBean! org.foo.Order Usable from any application in the container ● java:app/orderejb/OrderBean java:app/orderejb/OrderBean!com.acme.Order Fully-qualified interface name ● java:module/OrderBean java:module/OrderBean! org.foo.Order
  • 15. Managed Beans 1.0 ● Separate spec shipped with Java EE 6 ● Container-managed POJOs ● Support a small set of basic services ● Injection (@Resource...) ● Life-cycle (@PostConstruct, @PreDestroy) ● Interceptor (@Interceptor, @AroundInvoke) ● Lightweight component model
  • 16. Managed Beans 1.0 @javax.annotation.ManagedBean public class MyPojo { @Resource private Datasource ds; @PostConstruct private void init() { .... } @Interceptors(LoggingInterceptor.class) public void myMethod() {...} }
  • 17. Interceptors 1.1 ● Address cross-cutting concerns in Java EE ● Were part of the EJB 3.0 spec ● Now a seperate spec shipped with EJB 3.1 ● Can be uses in EJBs... ● … as well as ManagedBeans ● @AroundInvoke ● @AroundTimeout for EJB timers
  • 18. Agenda ● Quick overview ● New concepts ● New features on existing specifications ● JPA 2.0, EJB 3.1, Servlet 3.0, JSF 2.0 ● New specifications ● Summary
  • 19. JPA 2.0 ● Evolves separately from EJB now ● JSR 317 ● Richer mappings ● Richer JPQL ● Standard config options ● Criteria API ● ...
  • 20. Richer mapping ● Collection of embeddables and basic types ● Not just collection of JPA entities ● Multiple levels of embeddables ● More flexible support for Maps ● Keys, values can be one of : entities, embeddables or basic types ● More relationship mapping options ● Unidirectional 1-many foreign key mappings
  • 21. Collections of Embeddable Types @Embeddable public class BookReference { String title; Float price; String description; String isbn; Integer nbOfPage; ... } @Entity public class ListOfGreatBooks { @ElementCollection protected Set<BookReference> javaBooks; @ElementCollection protected Set<String> tags; ... }
  • 22. Richer JPQL ● Added entity type to support non-polymorphic queries ● Allow joins in subquery FROM clause ● Added new reserved words ● ABS, BOTH, CONCAT, ELSE, END, ESCAPE, LEADING, LENGTH, LOCATE, SET, SIZE, SQRT, SUBSTRING, TRAILING
  • 23. Criteria API ● Strongly typed criteria API ● Object-based query definition objects ● (Rather than JPQL string-based) ● Operates on the meta-model ● Browse the structure of a Persistence Unit ● Dynamically: EntityManager.getMetamodel() ● Statically: Each entity X has a metamodel class X_ ● CriteriaQuery as a query graph
  • 24. Criteria API EntityManager em = ...; CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Book> query = cb.createQuery(Book.class); Root<Book> book = query.from(Book.class); query.select(book) .where(cb.equal(book.get("description"), "")); SELECT b FROM Book b WHERE b.description IS EMPTY
  • 25. Criteria API (Type-safe) EntityManager em = ...; CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Book> query = cb.createQuery(Book.class); Root<Book> book = query.from(Book.class); query.select(book) .where(cb.isEmpty(book.get(Book_.description))); Statically generated JPA 2.0 MetaModel
  • 26. Criteria API (Builder pattern) EntityManager em = ...; CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Book> query = cb.createQuery(Book.class); Root<Book> book = query.from(Book.class); query.select(book) .where(cb.isEmpty(book.get(Book_.description))) .orderBy(...) .distinct(true) .having(...) .groupBy(...); List<Book> books = em.createQuery(query).getResultList();
  • 27. Standard properties ● In persistence.xml : ● javax.persistence.jdbc.driver ● javax.persistence.jdbc.url ● javax.persistence.jdbc.user ● javax.persistence.jdbc.password ● javax.persistence.lock.scope ● javax.persistence.lock.timeout
  • 28. And more... ● detach() ● Join<X,Y>, ListJoin, MapJoin ● Orphan removal functionality ● @OneToMany(orphanRemoval=true) ● BeanValidation integration on lifecycle ● Second-level cache API ● @Cacheable annotation on entities ● contain(Class,PK), evict(Class,PK), ... ● Pessimistic locking
  • 29. Servlet 3.0 ● Ease of development ● Pluggability ● Asynchronous support
  • 30. Ease of development ● Annotations based programming model ● @WebServlet ● @WebFilter ● @WebListener ● @WebInitParam ● Optional web.xml ● Better defaults and CoC
  • 31. A servlet 3.0 example @WebServlet(urlPatterns={"/MyApp"}) public class MyServlet extends HttpServlet { public void doGet (HttpServletRequest req, HttpServletResponse res){ .... } } web.xml is optional ● Same for @WebFilter and @WebListener
  • 32. Pluggability ● Fragments are similar to web.xml ● <web-fragment> instead of <web-app> ● Declare their own servlets, listeners and filters ● Annotations and web fragments are merged following a configurable order ● JARs need to be placed in WEB-INF/lib ● and use /META-INF/web-fragment.xml ● Overridden by main web.xml
  • 33. And more... ● Async support (Comet-style) ● Static resources in META-INF/resources ● Configuration API ● Add and configure Servlet, Filters, Listeners ● Add security constraints ● Using ServletContext API ● File upload (similar to Apache File Upload) ● Configure cookie session name ● Security with @ServletSecurity
  • 34. EJB 3.1 ● Optional local interface ● Packaging in a war ● Asynchronous calls ● Timer service ● Singleton ● Embeddable container
  • 35. Optional Local Interface ● @Local, @Remote ● Interfaces are not always needed ● Only for local interfaces ● Remote interfaces are now optional ! @Stateless public class HelloBean { public String sayHello() { return "Hello world!"; } }
  • 36. Packaging in a war foo.ear foo.war lib/foo_common.jar WEB-INF/classes com/acme/Foo.class com/acme/Foo.class com/acme/FooServlet.class com/acme/FooEJB.class foo_web.war WEB-INF/web.xml WEB-INF/classes com/acme/FooServlet.class foo_ejb.jar com/acme/FooEJB.class com/acme/FooEJBLocal.class
  • 37. Asynchronous calls ● How to have asynchronous call in EJBs ? ● JMS is more about sending messages ● Threads and EJB's don't integrate well ● @Asynchronous ● Applicable to any EJB type ● Best effort, no delivery guarantee ● Method returns void or Future<T> ● javax.ejb.AsyncResult helper class : return new AsyncResult<int>(result)
  • 38. Asynchronous calls @Stateless public class OrderBean { public void createOrder() { Order order = persistOrder(); sendEmail(order); // fire and forget } public Order persistOrder() {...} @Asynchronous public void sendEmail(Order order) {...} }
  • 39. Timer Service ● Programmatic and Calendar based scheduling ● « Last day of the month » ● « Every five minutes on Monday and Friday » ● Cron-like syntax ● second [0..59], minute[0..59], hour[0..23]... ● dayOfMonth[1..31] ● dayOfWeek[0..7] or [sun, mon, tue..] ● Month[0..12] or [jan,feb..]
  • 40. Timer Service @Stateless public class WakeUpBean { @Schedule(dayOfWeek="Mon-Fri", hour="9") void wakeUp() { ... } }
  • 41. Singleton ● New component ● No/local/remote interface ● Follows the Singleton pattern ● One single EJB per application per JVM ● Used to share state in the entire application ● State not preserved after container shutdown ● Added concurrency management ● Default is single-threaded ● @ConcurrencyManagement
  • 42. Singleton @Singleton public class CachingBean { private Map cache; @PostConstruct void init() { cache = ...; } public Map getCache() { return cache; } public void addToCache(Object key, Object val) { cache.put(key, val); } }
  • 43. Embeddable Container ● API allowing to : EJB 3.1 Embedded container Transaction Security Messaging ● Initialize a container manager system engine ● Get container ctx Java SE ● … ● Can run in any Java SE environment ● Batch processing ● Simplifies testing ● Just a jar file in your classpath
  • 44. Embeddable Container public static void main(String[] args){ EJBContainer container = EJBContainer.createEJBContainer(); Context context = container.getContext(); Hello h = (Hello)context.lookup("Global_JNDI_Name"); h.sayHello(); container.close(); }
  • 45. And more... ● Interceptors and InterceptorBinding ● Singletons can be chained ● Non persistent timer ● @StatefulTimeout ● ...
  • 46. JSF 2.0 ● The standard component-oriented MVC framework ● Part of Java EE 5 ● Part of Java EE 6 and Web Profile ● Other frameworks can rely on EE 6 extensibility ● Deserves its 2.0 version number ● New features, issues fixed, performance focus ● Fully available today in Mojarra 2.0.2 ● Production-quality implementation ● Part of GlassFish v3
  • 47. Facelets now preferred VDL ● Facelets (XHTML) as alternative to JSP ● Based on a generic View Description Language (VDL) ● Can't add Java code to XHTML page (and “that's a good thing!”™) ● Pages are usable from basic editors ● IDEs offer traditional value-add: ● Auto-completion (EL) ● (Composite) Component management ● Project management, testing, etc...
  • 48. Setup, configuration ● JSF 2.0 does not mandate Servlet 3.0 ● Servlet 2.5 containers will run JSF 2.0 ● web.xml may be optional depending on runtime ● faces-config.xml now optional ● @javax.faces.bean.ManagedBean ● Not required with JSR 299 ● Navigation can now belong to the page (<navigation-rules> become optional)
  • 49. JSF Composite Component ● Using JSF 1.x ● Implement UIComponent, markup in renderer, register in faces-config.xml, add tld, ... ● With JSF 2.0 ● Single file, no Java code needed ● Use XHTML and JSF tags to create components <html xmlns:cc="http://java.sun.com/jsf/composite"> <cc:interface> <cc:attribute ...> <cc:implementation> ● Everything else is auto-wired
  • 50. /resources/ezcomp/mycomponent.xhtml Naming the component <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:composite="http://java.sun.com/jsf/composite"> Defining the <!-- INTERFACE --> <composite:interface> component <composite:attribute name="param"/> Implicit EL object </composite:interface> <!-- IMPLEMENTATION --> <composite:implementation> <h:outputText value="Hello there, #{cc.attrs.param}"/> </composite:implementation> </html> <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" Using the xmlns:custom="http://java.sun.com/jsf/composite/ezcomp"> <h:body> component <custom:mycomponent param="Java EE 6 attendees"/> </h:body> </html>
  • 51. Ajax support ● Inspired by RichFaces, IceFaces, DynaFaces, ... ● Common JavaScript library (jsf.js) ● request JavaScript functions captured by PartialViewContext for sub-tree processing ● Client JavaScript updates the DOM <h:commandButton onclick="jsf.ajax.request(this,event,{render:'foo'}); return false;"/> ● <f:ajax> tag to ajaxify existing pages xmlns:f="http://java.sun.com/jsf/core" <h:commandButton> <f:ajax event="change" execute="myForm" render="foo" /> </h:commandButton>
  • 52. And more... ● Validation delegated to BeanValidation ● Easier resources management ● Better error reporting ● New managed bean scope (View) ● Groovy support (Mojarra) ● Bookmarkable URLs ● Templating : define and apply layouts ● Project stages (dev vs. test vs. production) ● ...
  • 53. Agenda ● Quick overview ● New concepts ● New features on existing specifications ● New specifications ● Bean Validation, JAX-RS, @Inject, CDI ● Summary
  • 54. Bean Validation 1.0 ● Enable declarative validation in your applications ● Constrain Once, Validate Anywhere ● restriction on a bean, field or property ● not null, size between 1 and 7, valid email... ● Standard way to validate constraints ● Integration with JPA 2.0 & JSF 2.0
  • 55. Bean Validation 1.0 public class Address { @NotNull @Size(max=30, message="longer than {max} characters") private String street1; ... @NotNull @Valid private Country country; } public class Country { @NotNull @Size(max=20) request recursive private String name; object graph ... validation }
  • 56. Build your own! @Size(min=5, max=5) @ConstraintValidator(ZipcodeValidator.class) @Documented @Target({ANNOTATION_TYPE, METHOD, FIELD}) @Retention(RUNTIME) public @interface ZipCode { String message() default "Wrong zipcode"; String[] groups() default {}; }
  • 57. Integration with JPA 2.0 and JSF 2.0 ● Automatic ● No extra code ● Happens during @PrePersist, @PreUpdate, @PreRemove ● Shows how well integrated EE can be
  • 58. And more... ● Group subsets of constraints ● Partial validation ● Order constraint validations ● Create your own ● Bootstrap API ● Messages can be i18n ● ...
  • 59. JAX-RS 1.1 ● High-level HTTP API for RESTful Services ● POJO and Annotations Based ● API also available ● Maps HTTP verbs (Get, Post, Put, Delete...) ● JAX-RS 1.0 has been released in 2008 ● JAX-RS 1.1 integrates with EJBs (and more generally with Java EE 6)
  • 60. Hello World @Path("/helloworld") public class HelloWorldResource { @GET @Produces("text/plain") public String sayHello() { return "Hello World"; } } GET http://example.com/helloworld
  • 61. Hello World Request GET /helloworld HTTP/1.1 Host: example.com Accept: text/plain Response HTTP/1.1 200 OK Date: Wed, 12 Nov 2008 16:41:58 GMT Server: GlassFish v3 Content-Type: text/plain; charset=UTF-8 Hello World
  • 62. Different Mime Types @Path("/helloworld") public class HelloWorldResource { @GET @Produces("image/jpeg") public byte[] paintHello() { ... @GET @Produces("text/plain") public String displayHello() { ... @POST @Consumes("text/xml") public void updateHello(String xml) { ... }
  • 63. Parameters & EJBs @Path("/users/{userId}") @Stateless public class UserResource { @PersistenceContext EntityManage em; @GET @Produces("text/xml") public String getUser(@PathParam("userId") String id){ User u = em.find(User.class, id) ... } }
  • 64. And more... ● Different parameters (@MatrixParam, @QueryParam, @CookieParam ...) ● Support for @Head and @Option ● Inject UriInfo using @Context ● JAX-RS servlet mapping with @ApplicationPath("rs") ● ...
  • 65. Injection in Java EE 5 ● Common Annotation ● @Resource ● Specialized cases ● @EJB, @WebServicesRef, @PersistenceUnit … ● Requires managed objects ● EJB, Servlet and JSF Managed Bean in EE 5 ● Also in any Java EE 6's javax.annotation.ManagedBean
  • 66. Injection in Java EE 6 CDI (JSR 299) & @Inject (JSR 330) Inject just about anything anywhere... ...yet with strong typing
  • 67. The tale of 2 dependency JSRs ● Context & Dependency Injection for Java EE ● Born as WebBeans, unification of JSF and EJB ● “Loose coupling, strong typing" ● Weld as the reference implementation, others to follow (Caucho, Apache) ● Dependency Injection for Java (JSR 330) ● Lead by Google and SpringSource ● Minimalistic dependency injection, @Inject ● Applies to Java SE, Guice as the reference impl. ● Both aligned and part of Java EE 6 Web Profile
  • 68. @Inject ● javax.inject package ● @Inject : Identifies injectable constructors, methods, and fields ● @Named : String-based qualifier (for EL) ● @Qualifier : Identifies qualifier ● @Scope : Identifies scope annotations ● @Singleton : Instantiates once
  • 69. Injection @Inject Customer cust; injection point type
  • 70. Qualifier Annotation @Target({TYPE,METHOD,PARAMETER,FIELD}) @Retention(RUNTIME) @Documented @Qualifier public @interface Premium {…} @Premium // my own qualifier (see above) public class SpecialCustomer implements Customer { public void buy() {…} }
  • 71. Injection with qualifier qualifier (user-defined label) i.e. « which one? » @Inject @Premium Customer cust; injection point type
  • 72. Contexts (The 'C' in CDI) ● Built-in “Web” Scopes : ● @RequestScoped *: requires Serializable fields to enable passivation ● @SessionScoped* ● @ApplicationScoped* ● @ConversationScoped* ● Other Scopes ● @Dependent is the default pseudo-scope for un-scoped beans (same as Managed Beans) ● Build your own @ScopeType ● Clients need not be scope-aware
  • 73. @ConversationScoped ● A conversation is : ● explicitly demarcated ● associated with individual browser tabs ● accessible from any JSF request @Named @ConversationScoped public class ItemFacade implements Serializable { @Inject Conversation conversation; ... conversation.begin(); // long-running ... conversation.end(); // schedule for destruction
  • 74. And more... ● Alternatives ● @Alternative annotation on various impl. ● Interceptors & Decorators ● Loosely-coupled orthogonal (technical) interceptors ● @Decorator bound to given interface ● Stereotypes (@Stereotype) ● Captures any of the above common patterns ● Events ● Loosely-coupled (conditional) @Observable events
  • 75. Agenda ● Quick overview ● New concepts ● New features on existing specifications ● New specifications ● Summary
  • 76. Java EE 6 is... Richer Ligther Simpler
  • 77. Application servers are... Less monolithic More OSGi based Ready for other profiles
  • 78. Time is changing Java EE 6 and GlassFish v3 shipped th final releases on December 10 2009
  • 79. Want to know more ? ● Covers most specs ● 450 pages about Java EE 6 “The best book ever !” – my sister “Nice photo at the back” – my mum “Plenty of pages to draw on” – my daughter
  • 80. Thanks for your attention! Q&A