SlideShare a Scribd company logo
What's new in Java EE 6 ? by  a ntonio  g oncalves
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
Author (Java EE 5 and Java EE 6)
JCP expert member (Java EE 6, Java EE 7)
Co-leader of the Paris JUG
Les Cast Codeurs podcast
Java Champion
Quick overview
A brief history
Zooming in Java EE 6 Web Services JAX-RPC 1.1 JAXM 1.0 JAX-RS 1.1 JAXR 1.0 Web Services 1.3 WS Metadata  2.0 Web JSF 2.0 Servlet 3.0 JSP 2.2 EL 2.2 JSTL 1.2 Debugging  1.0 Support Enterprise EJB 3.1 JAF 1.1 JavaMail 1.4 JCA 1.6 JMS 1.1 JPA 2.0 JTA 1.1 Management, Security, Common CDI (JSR 299) 1.0 @Inject  (JSR 330) 1.0 Bean Validation 1.0 Interceptors 1.1 Managed Beans 1.0 JACC 1.4 Java EE Application Deployment 1.2 Java EE Management 1.1 JASPIC 1.0 + Java SE 6 JAX-WS 2.2 JAXB 2.2 JDBC 4.0 JNDI 1.5 SAAJ 1.3 Common 1.1  Annotations RMI Java IDL JMX JAAS JAXP StAX ...
New concepts
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
Web Profile 1.0 Subset of full platform
For web development Packages in a war Separate specification
Evolves at its own pace
Others will come Minimal (Servlet/JSP)
Portal.... JSF 2.0 Servlet 3.0 JSP 2.2 EL 2.2 JSTL 1.2 EJB  Lite 3.1 Managed Beans 1.0 Interceptors 1.1 JTA 1.1 JPA 2.0 Bean Validation  1.0 CDI 1.0 @Inject 1.0
EJB Lite Subset of the EJB 3.1 API
Used in Web profile
Packaged in a war Local Session Bean Injection CMT / BMT Interceptors Security Message Driven Beans EJB Web Service Endpoint RMI/IIOP Interoperability Remote interface 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 java: app /orderejb/OrderBean java: app /orderejb/OrderBean!com.acme.Order java: module /OrderBean java: module /OrderBean!org.foo.Order Fully-qualified interface name Usable from any application in the container
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
JPA 2.0
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(&quot;description&quot;) , &quot;&quot;)); 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 Annotations based programming model @WebServlet
@WebFilter

More Related Content

ODP
To inject or not to inject: CDI is the question
PPTX
When Enterprise Java Micro Profile meets Angular
PDF
50 new features of Java EE 7 in 50 minutes
PDF
Just enough app server
PDF
CDI: How do I ?
PDF
Dependency Injection with CDI in 15 minutes
PDF
Bytecode manipulation with Javassist and ASM
PPTX
Getting started with Java 9 modules
To inject or not to inject: CDI is the question
When Enterprise Java Micro Profile meets Angular
50 new features of Java EE 7 in 50 minutes
Just enough app server
CDI: How do I ?
Dependency Injection with CDI in 15 minutes
Bytecode manipulation with Javassist and ASM
Getting started with Java 9 modules

What's hot (20)

PDF
Java Enterprise Edition
PDF
How to build to do app using vue composition api and vuex 4 with typescript
PPT
比XML更好用的Java Annotation
PPTX
Jdk 7 4-forkjoin
PPTX
Jdk(java) 7 - 6 기타기능
PDF
Concurrency and Thread-Safe Data Processing in Background Tasks
ODP
From Java 6 to Java 7 reference
PPTX
Spring & Hibernate
PPTX
Making Java more dynamic: runtime code generation for the JVM
ODP
Spring 4 advanced final_xtr_presentation
PPTX
Async task, threads, pools, and executors oh my!
PDF
Java libraries you can't afford to miss
PPTX
Introduction to CDI and DI in Java EE 6
ODP
Unit Testing and Coverage for AngularJS
PDF
Java 5 and 6 New Features
PDF
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
PDF
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
PDF
OSGi and Eclipse RCP
PPTX
Code generation for alternative languages
Java Enterprise Edition
How to build to do app using vue composition api and vuex 4 with typescript
比XML更好用的Java Annotation
Jdk 7 4-forkjoin
Jdk(java) 7 - 6 기타기능
Concurrency and Thread-Safe Data Processing in Background Tasks
From Java 6 to Java 7 reference
Spring & Hibernate
Making Java more dynamic: runtime code generation for the JVM
Spring 4 advanced final_xtr_presentation
Async task, threads, pools, and executors oh my!
Java libraries you can't afford to miss
Introduction to CDI and DI in Java EE 6
Unit Testing and Coverage for AngularJS
Java 5 and 6 New Features
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
OSGi and Eclipse RCP
Code generation for alternative languages
Ad

Viewers also liked (19)

PPT
Java EE Introduction
PDF
The Java EE 6 platform
PDF
Java EE 6 Component Model Explained
PDF
Whats New In Java Ee 6
PDF
Lightweight AOP with CDI and JPA
PPTX
Future of Java EE with SE 8 (revised)
PDF
Are app servers still fascinating
PPTX
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
PDF
Come and Play! with Java EE 7
PDF
Case Study of Financial Web System Development and Operations with Oracle Web...
PPTX
Move from J2EE to Java EE
PPTX
Java EE 7 for Real Enterprise Systems
PDF
Java one 2015 [con3339]
PPTX
Seven Points for Applying Java EE 7
PDF
Java EE 7 - Overview and Status
PPTX
IBM WebSphere Application Server (Clustering) Concept
PDF
RESTful web service with JBoss Fuse
PDF
Introduction to Java Programming Language
PDF
OpenThink Labs Training : Diving into Java, Breaking the Surface
Java EE Introduction
The Java EE 6 platform
Java EE 6 Component Model Explained
Whats New In Java Ee 6
Lightweight AOP with CDI and JPA
Future of Java EE with SE 8 (revised)
Are app servers still fascinating
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
Come and Play! with Java EE 7
Case Study of Financial Web System Development and Operations with Oracle Web...
Move from J2EE to Java EE
Java EE 7 for Real Enterprise Systems
Java one 2015 [con3339]
Seven Points for Applying Java EE 7
Java EE 7 - Overview and Status
IBM WebSphere Application Server (Clustering) Concept
RESTful web service with JBoss Fuse
Introduction to Java Programming Language
OpenThink Labs Training : Diving into Java, Breaking the Surface
Ad

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

ODP
Javaee6 Overview
PPT
J2 Ee Overview
PPT
J2EE - Practical Overview
PDF
Get ready for spring 4
PPT
What is Java Technology (An introduction with comparision of .net coding)
PPT
J2EEvs.NET
PPTX
Java/Servlet/JSP/JDBC
PPT
.NET Vs J2EE
PPTX
Java solution
PPT
02 Hibernate Introduction
PPT
JEE5 New Features
PDF
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
PPT
basic_java.ppt
PPT
Java New Evolution
ODP
JBoss AS7 OSDC 2011
PPT
Tu1 1 5l
PPTX
Java se7 features
PDF
New Features Of JDK 7
PPTX
Integration of Backbone.js with Spring 3.1
PDF
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
Javaee6 Overview
J2 Ee Overview
J2EE - Practical Overview
Get ready for spring 4
What is Java Technology (An introduction with comparision of .net coding)
J2EEvs.NET
Java/Servlet/JSP/JDBC
.NET Vs J2EE
Java solution
02 Hibernate Introduction
JEE5 New Features
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
basic_java.ppt
Java New Evolution
JBoss AS7 OSDC 2011
Tu1 1 5l
Java se7 features
New Features Of JDK 7
Integration of Backbone.js with Spring 3.1
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Encapsulation theory and applications.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
August Patch Tuesday
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
A Presentation on Touch Screen Technology
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Approach and Philosophy of On baking technology
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Getting Started with Data Integration: FME Form 101
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Encapsulation theory and applications.pdf
TLE Review Electricity (Electricity).pptx
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Enhancing emotion recognition model for a student engagement use case through...
Web App vs Mobile App What Should You Build First.pdf
August Patch Tuesday
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
A Presentation on Touch Screen Technology
1 - Historical Antecedents, Social Consideration.pdf
WOOl fibre morphology and structure.pdf for textiles
Approach and Philosophy of On baking technology
Tartificialntelligence_presentation.pptx
Programs and apps: productivity, graphics, security and other tools
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Getting Started with Data Integration: FME Form 101
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf

What's new in Java EE 6