SlideShare a Scribd company logo
<Insert Picture Here>




An Overview of the Java EE 6 Platform
Roberto Chinnici
Java EE Platform Lead
The following is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.
Agenda


•   What's new in Java EE 6?
•   Web Profile
•   Extensibility
•   Highlights from some of the new APIs
<Insert Picture Here>



Java EE 6 Platform
JAVA EE 6
  FINAL RELEASE
DECEMBER 10, 2009
What's New?


•   Several new APIs
•   Web Profile
•   Pluggability/extensibility
•   Dependency injection
•   Lots of improvements to existing APIs
New and updated components


•   EJB 3.1               •   Managed Beans 1.0
•   JPA 2.0               •   Interceptors 1.1
•   Servlet 3.0           •   JAX-WS 2.2
•   JSF 2.0               •   JSR-109 1.3
•   JAX-RS 1.1            •   JSP 2.2
•   Connectors 1.6        •   EL 2.2
•   Bean Validation 1.0   •   JSR-250 1.1
•   DI 1.0                •   JASPIC 1.1
•   CDI 1.0               •   JACC 1.5
Web Profile


• First Java EE profile to be defined
• A fully-functional, mid-size stack for modern web
  application development
• Complete, but not the kitchen sink
Java EE 6 Web Profile Contents


                      JSF 2.0

     JSP 2.2 · EL 2.2 · JSTL 1.2 · JSR-45 1.0

                    Servlet 3.0

EJB 3.1 Lite · DI 1.0 · CDI 1.0 · Managed Beans 1.0

Bean Validation 1.0 · Interceptors 1.1 · JSR-250 1.1

                 JPA 2.0 · JTA 1.1
Java EE 6 Web Profile Extension Points


                       JSF 2.0

      JSP 2.2 · EL 2.2 · JSTL 1.2 · JSR-45 1.0

                     Servlet 3.0

EJB 3.1 Lite · DI 1.0 · CDI 1.0 · Managed Beans 1.0

 Bean Validation 1.0 · Interceptors 1.1 · JSR-250 1.1

                  JPA 2.0 · JTA 1.1
Pluggability/Extensibility


• Focus on the web tier in this release
• Create a level playing field for third-party frameworks
• Simplify packaging of web applications
Modular Web Applications


•   Libraries can contain /META-INF/web-fragment.xml
•   web.xml is optional
•   @WebServlet, @WebFilter annotations
•   ServletContainerInitializer interface
•   Programmatic registration of components
•   Resource jars containing /META-INF/resources

      /WEB-INF/lib/catalog.jar
         /META-INF/resources/catalog/books.html
→    http://myserver:8080/myapp/catalog/books.html
Sample Servlet

import javax.servlet.annotation.WebServlet;

@WebServlet(urlPatterns=”/contents”)
public class MyServlet extends HttpServlet {
  public void doGet(HttpServletRequest request,
                    HttpServletResponse response) {
    // ...
  }

}



    No deployment descriptor needed
Sample Web Fragment Descriptor

<web-fragment
     version=”3.0”
     xmlns="http://java.sun.com/xml/ns/javaee">
  <servlet>
    <servlet-name>welcome</servlet-name>
    <servlet-class>WelcomeServlet</servlet-class>
  </servlet>
  <listener>
    <listener-class>RequestListener</listener-class>
  </listener>
</web-fragment>
Strategy for Evolving the APIs


•   Capture common patterns
•   Fix inconsistencies
•   Adopt what works
•   Make APIs work better together
•   Reducing boilerplate/packaging
•   Be transparent
JAX-RS 1.1


•   RESTful web services API
•   Already widely adopted
•   Really a general, high-level HTTP API
•   Annotation-based programming model
•   Programmatic API when needed
JAX-RS Sample

@Path(“widgets/{id}”)
@Consumes(“application/widgets+xml”)
@Produces(“application/widgets+xml”)
public class WidgetResource {
    public WidgetResource(@PathParam(“id”)
                          String id) {…}

    @GET
    public Widget getWidget() {…}

    @PUT
    public void putWidget(Widget widget){…}
}
Building HTTP Responses



return Response.created(createdUri)
               .entity(createdContent)
               .build();

return Response.status(404)
        .entity(message)
        .type("text/plain")
        .build();




Similarly, use UriBuilder to build URIs
EJB 3.1


• @Singleton beans
• @Startup beans
• Declarative timers
• Asynchronous method calls
   @Asynchronous public Future<Integer> compute();
• Define EJBs directly inside a web application
• EJBContainer API works on Java SE
EJB 3.1 Code Snippets
@Singleton @Startup
public class StartupBean {
  @PostConstruct
  public void doAtStartup() { … }
}

@Stateless public class BackupBean {
  @Schedule(dayOfWeek=”Fri”, hour=”3”, minute=”15”)
  public void performBackup() { … }
}

@Stateless public class CacheRefreshingBean {
  @Schedule(minute=”*/5”, persistent=false)
  public void refreshCache() { … }
}
EJB 3.1 Lite


•   A subset of EJB 3.1
•   All types of session beans (stateful, stateless, singletons)
•   Local access only
•   Declarative transactions and security
•   Interceptors
•   ejb-jar.xml descriptor optional
Java EE 6 Web Profile Core Component Model


                      JSF 2.0

      JSP 2.2 · EL 2.2 · JSTL 1.2 · JSR-45 1.0

                    Servlet 3.0

EJB 3.1 Lite · DI 1.0 · CDI 1.0 · Managed Beans 1.0

Bean Validation 1.0 · Interceptors 1.1 · JSR-250 1.1

                 JPA 2.0 · JTA 1.1
Dependency Injection


• DI + CDI (JSR-330 + JSR-299)
• @Resource still around for container resources
  @Resource DataSource myDB;
• Added @Inject annotation for type-safe injection
  @Inject @LoggedIn User user;
• Automatic scope management (request, session, etc.)
• No configuration: beans discovered at startup
• Extensible via the BeanManager API
Scoped Bean with Constructor Injection


@ApplicationScoped
public class CheckoutHandler {
  @Inject
  public CheckoutHandler(
          @LoggedIn User user,
          @Reliable @PayBy(CREDIT_CARD)
          PaymentProcessor processor,
          @Default ShoppingCart cart) {…}
}


Injection points identified by Qualifier + Type
@Default qualifier can be omitted
Why Use CDI?


• Structure the application as a set of beans
• Injection and events enable decoupling
  – No direct dependency between beans
  – Freedom to refactor the code, change implementations
• Automatic state management base on scope
• Support EJB components and plain “managed beans”
• Beans discovered automatically - no configuration
  needed
• Extensible notion of bean
  – Can incorporate components from external frameworks
Java EE 6 Platform


•   More powerful
•   More flexible
•   More extensible
•   Easier to use




      http://www.oracle.com/javaee
Overview of Java EE 6 by Roberto Chinnici at SFJUG

More Related Content

PDF
Sun Java EE 6 Overview
PDF
Java EE 6 Component Model Explained
PDF
Java EE 6 & GlassFish 3
PDF
Java EE 6 workshop at Dallas Tech Fest 2011
PDF
Java EE6 CodeCamp16 oct 2010
PDF
Java 7 workshop
PDF
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
PDF
Running your Java EE applications in the Cloud
Sun Java EE 6 Overview
Java EE 6 Component Model Explained
Java EE 6 & GlassFish 3
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE6 CodeCamp16 oct 2010
Java 7 workshop
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
Running your Java EE applications in the Cloud

What's hot (19)

PDF
Java EE 6 & GlassFish v3 @ DevNexus
PDF
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
PDF
Understanding the nuts & bolts of Java EE 6
PDF
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
PDF
The State of Java under Oracle at JCertif 2011
PDF
Andrei Niculae - JavaEE6 - 24mai2011
PDF
Glass Fishv3 March2010
PDF
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
PDF
Java EE6 Overview
PDF
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
PDF
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
PDF
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
PDF
Java EE 6 and GlassFish v3: Paving the path for future
PDF
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
PDF
Understanding
PDF
Java EE7 Demystified
PDF
Deep Dive Hands-on in Java EE 6 - Oredev 2010
PDF
What's new in Java EE 6
PPTX
Getting Started with Java EE 7
Java EE 6 & GlassFish v3 @ DevNexus
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Understanding the nuts & bolts of Java EE 6
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
The State of Java under Oracle at JCertif 2011
Andrei Niculae - JavaEE6 - 24mai2011
Glass Fishv3 March2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE6 Overview
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Understanding
Java EE7 Demystified
Deep Dive Hands-on in Java EE 6 - Oredev 2010
What's new in Java EE 6
Getting Started with Java EE 7
Ad

Viewers also liked (20)

PPTX
Media evaluation question 5
PPT
Java for the Beginners
PPTX
Introduction to java
PDF
NUS Hackers Club Mar 21 - Whats New in JavaSE 8?
PPTX
Intro to java programming
PPT
Introduction to Ruby on Rails
PPTX
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
PDF
R Programming Overview
PPTX
Overview HTML, HTML5 and Validations
PPTX
What is Python? An overview of Python for science.
PDF
Java presentation
PPTX
PPTX
A brief overview of java frameworks
PPTX
Java seminar
PPTX
C++ Overview PPT
PPT
Overview of c++
KEY
Intro to java
PDF
Ruby Rails Overview
PDF
Java ppt Gandhi Ravi (gandhiri@gmail.com)
PDF
Python overview
Media evaluation question 5
Java for the Beginners
Introduction to java
NUS Hackers Club Mar 21 - Whats New in JavaSE 8?
Intro to java programming
Introduction to Ruby on Rails
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
R Programming Overview
Overview HTML, HTML5 and Validations
What is Python? An overview of Python for science.
Java presentation
A brief overview of java frameworks
Java seminar
C++ Overview PPT
Overview of c++
Intro to java
Ruby Rails Overview
Java ppt Gandhi Ravi (gandhiri@gmail.com)
Python overview
Ad

Similar to Overview of Java EE 6 by Roberto Chinnici at SFJUG (20)

PDF
Java EE 6, Eclipse @ EclipseCon
ODP
OTN Developer Days - Java EE 6
PPTX
Java EE8 - by Kito Mann
PDF
Java EE 6, Eclipse, GlassFish @EclipseCon 2010
PDF
S313557 java ee_programming_model_explained_dochez
PDF
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
PDF
Contextual Dependency Injection for Apachecon 2010
PDF
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
PDF
Java EE 6 = Less Code + More Power
PDF
Java EE 8: On the Horizon
PPTX
Java ee 8 + security overview
PDF
What’s new in Java SE, EE, ME, Embedded world & new Strategy
PPTX
Java EE 8 Update
PDF
스프링 프레임워크
PDF
Utilizing JSF Front Ends with Microservices
PDF
AAI 1713-Introduction to Java EE 7
PDF
AAI-1713 Introduction to Java EE 7
PDF
WildFly AppServer - State of the Union
PDF
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
PDF
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 6, Eclipse @ EclipseCon
OTN Developer Days - Java EE 6
Java EE8 - by Kito Mann
Java EE 6, Eclipse, GlassFish @EclipseCon 2010
S313557 java ee_programming_model_explained_dochez
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Contextual Dependency Injection for Apachecon 2010
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 = Less Code + More Power
Java EE 8: On the Horizon
Java ee 8 + security overview
What’s new in Java SE, EE, ME, Embedded world & new Strategy
Java EE 8 Update
스프링 프레임워크
Utilizing JSF Front Ends with Microservices
AAI 1713-Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7
WildFly AppServer - State of the Union
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
Java EE 7 Soup to Nuts at JavaOne 2014

More from Marakana Inc. (20)

PDF
Android Services Black Magic by Aleksandar Gargenta
PDF
JRuby at Square
PDF
Behavior Driven Development
PDF
Martin Odersky: What's next for Scala
PPT
Why Java Needs Hierarchical Data
PDF
Deep Dive Into Android Security
PDF
Securing Android
PDF
Pictures from "Learn about RenderScript" meetup at SF Android User Group
PDF
Android UI Tips, Tricks and Techniques
PDF
2010 07-18.wa.rails tdd-6
PDF
Efficient Rails Test-Driven Development - Week 6
PDF
Graphicsand animations devoxx2010 (1)
PDF
What's this jQuery? Where it came from, and how it will drive innovation
PDF
jQuery State of the Union - Yehuda Katz
PDF
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
PDF
Efficient Rails Test Driven Development (class 4) by Wolfram Arnold
PDF
Efficient Rails Test Driven Development (class 3) by Wolfram Arnold
PDF
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
PDF
Replacing Java Incrementally
PDF
Learn to Build like you Code with Apache Buildr
Android Services Black Magic by Aleksandar Gargenta
JRuby at Square
Behavior Driven Development
Martin Odersky: What's next for Scala
Why Java Needs Hierarchical Data
Deep Dive Into Android Security
Securing Android
Pictures from "Learn about RenderScript" meetup at SF Android User Group
Android UI Tips, Tricks and Techniques
2010 07-18.wa.rails tdd-6
Efficient Rails Test-Driven Development - Week 6
Graphicsand animations devoxx2010 (1)
What's this jQuery? Where it came from, and how it will drive innovation
jQuery State of the Union - Yehuda Katz
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
Efficient Rails Test Driven Development (class 4) by Wolfram Arnold
Efficient Rails Test Driven Development (class 3) by Wolfram Arnold
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
Replacing Java Incrementally
Learn to Build like you Code with Apache Buildr

Recently uploaded (20)

PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
master seminar digital applications in india
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Cell Types and Its function , kingdom of life
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Basic Mud Logging Guide for educational purpose
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
TR - Agricultural Crops Production NC III.pdf
master seminar digital applications in india
Abdominal Access Techniques with Prof. Dr. R K Mishra
Renaissance Architecture: A Journey from Faith to Humanism
human mycosis Human fungal infections are called human mycosis..pptx
Cell Structure & Organelles in detailed.
Module 4: Burden of Disease Tutorial Slides S2 2025
PPH.pptx obstetrics and gynecology in nursing
O5-L3 Freight Transport Ops (International) V1.pdf
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Anesthesia in Laparoscopic Surgery in India
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Complications of Minimal Access Surgery at WLH
Cell Types and Its function , kingdom of life
Microbial disease of the cardiovascular and lymphatic systems
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Basic Mud Logging Guide for educational purpose
Mark Klimek Lecture Notes_240423 revision books _173037.pdf

Overview of Java EE 6 by Roberto Chinnici at SFJUG

  • 1. <Insert Picture Here> An Overview of the Java EE 6 Platform Roberto Chinnici Java EE Platform Lead
  • 2. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Agenda • What's new in Java EE 6? • Web Profile • Extensibility • Highlights from some of the new APIs
  • 5. JAVA EE 6 FINAL RELEASE DECEMBER 10, 2009
  • 6. What's New? • Several new APIs • Web Profile • Pluggability/extensibility • Dependency injection • Lots of improvements to existing APIs
  • 7. New and updated components • EJB 3.1 • Managed Beans 1.0 • JPA 2.0 • Interceptors 1.1 • Servlet 3.0 • JAX-WS 2.2 • JSF 2.0 • JSR-109 1.3 • JAX-RS 1.1 • JSP 2.2 • Connectors 1.6 • EL 2.2 • Bean Validation 1.0 • JSR-250 1.1 • DI 1.0 • JASPIC 1.1 • CDI 1.0 • JACC 1.5
  • 8. Web Profile • First Java EE profile to be defined • A fully-functional, mid-size stack for modern web application development • Complete, but not the kitchen sink
  • 9. Java EE 6 Web Profile Contents JSF 2.0 JSP 2.2 · EL 2.2 · JSTL 1.2 · JSR-45 1.0 Servlet 3.0 EJB 3.1 Lite · DI 1.0 · CDI 1.0 · Managed Beans 1.0 Bean Validation 1.0 · Interceptors 1.1 · JSR-250 1.1 JPA 2.0 · JTA 1.1
  • 10. Java EE 6 Web Profile Extension Points JSF 2.0 JSP 2.2 · EL 2.2 · JSTL 1.2 · JSR-45 1.0 Servlet 3.0 EJB 3.1 Lite · DI 1.0 · CDI 1.0 · Managed Beans 1.0 Bean Validation 1.0 · Interceptors 1.1 · JSR-250 1.1 JPA 2.0 · JTA 1.1
  • 11. Pluggability/Extensibility • Focus on the web tier in this release • Create a level playing field for third-party frameworks • Simplify packaging of web applications
  • 12. Modular Web Applications • Libraries can contain /META-INF/web-fragment.xml • web.xml is optional • @WebServlet, @WebFilter annotations • ServletContainerInitializer interface • Programmatic registration of components • Resource jars containing /META-INF/resources /WEB-INF/lib/catalog.jar /META-INF/resources/catalog/books.html → http://myserver:8080/myapp/catalog/books.html
  • 13. Sample Servlet import javax.servlet.annotation.WebServlet; @WebServlet(urlPatterns=”/contents”) public class MyServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) { // ... } } No deployment descriptor needed
  • 14. Sample Web Fragment Descriptor <web-fragment version=”3.0” xmlns="http://java.sun.com/xml/ns/javaee"> <servlet> <servlet-name>welcome</servlet-name> <servlet-class>WelcomeServlet</servlet-class> </servlet> <listener> <listener-class>RequestListener</listener-class> </listener> </web-fragment>
  • 15. Strategy for Evolving the APIs • Capture common patterns • Fix inconsistencies • Adopt what works • Make APIs work better together • Reducing boilerplate/packaging • Be transparent
  • 16. JAX-RS 1.1 • RESTful web services API • Already widely adopted • Really a general, high-level HTTP API • Annotation-based programming model • Programmatic API when needed
  • 17. JAX-RS Sample @Path(“widgets/{id}”) @Consumes(“application/widgets+xml”) @Produces(“application/widgets+xml”) public class WidgetResource { public WidgetResource(@PathParam(“id”) String id) {…} @GET public Widget getWidget() {…} @PUT public void putWidget(Widget widget){…} }
  • 18. Building HTTP Responses return Response.created(createdUri) .entity(createdContent) .build(); return Response.status(404) .entity(message) .type("text/plain") .build(); Similarly, use UriBuilder to build URIs
  • 19. EJB 3.1 • @Singleton beans • @Startup beans • Declarative timers • Asynchronous method calls @Asynchronous public Future<Integer> compute(); • Define EJBs directly inside a web application • EJBContainer API works on Java SE
  • 20. EJB 3.1 Code Snippets @Singleton @Startup public class StartupBean { @PostConstruct public void doAtStartup() { … } } @Stateless public class BackupBean { @Schedule(dayOfWeek=”Fri”, hour=”3”, minute=”15”) public void performBackup() { … } } @Stateless public class CacheRefreshingBean { @Schedule(minute=”*/5”, persistent=false) public void refreshCache() { … } }
  • 21. EJB 3.1 Lite • A subset of EJB 3.1 • All types of session beans (stateful, stateless, singletons) • Local access only • Declarative transactions and security • Interceptors • ejb-jar.xml descriptor optional
  • 22. Java EE 6 Web Profile Core Component Model JSF 2.0 JSP 2.2 · EL 2.2 · JSTL 1.2 · JSR-45 1.0 Servlet 3.0 EJB 3.1 Lite · DI 1.0 · CDI 1.0 · Managed Beans 1.0 Bean Validation 1.0 · Interceptors 1.1 · JSR-250 1.1 JPA 2.0 · JTA 1.1
  • 23. Dependency Injection • DI + CDI (JSR-330 + JSR-299) • @Resource still around for container resources @Resource DataSource myDB; • Added @Inject annotation for type-safe injection @Inject @LoggedIn User user; • Automatic scope management (request, session, etc.) • No configuration: beans discovered at startup • Extensible via the BeanManager API
  • 24. Scoped Bean with Constructor Injection @ApplicationScoped public class CheckoutHandler { @Inject public CheckoutHandler( @LoggedIn User user, @Reliable @PayBy(CREDIT_CARD) PaymentProcessor processor, @Default ShoppingCart cart) {…} } Injection points identified by Qualifier + Type @Default qualifier can be omitted
  • 25. Why Use CDI? • Structure the application as a set of beans • Injection and events enable decoupling – No direct dependency between beans – Freedom to refactor the code, change implementations • Automatic state management base on scope • Support EJB components and plain “managed beans” • Beans discovered automatically - no configuration needed • Extensible notion of bean – Can incorporate components from external frameworks
  • 26. Java EE 6 Platform • More powerful • More flexible • More extensible • Easier to use http://www.oracle.com/javaee