What's New with Java EE 6? · PDF file Java EE: Past & Present JPE Project J2EE 1.2...

Click here to load reader

  • date post

    02-Aug-2020
  • Category

    Documents

  • view

    2
  • download

    0

Embed Size (px)

Transcript of What's New with Java EE 6? · PDF file Java EE: Past & Present JPE Project J2EE 1.2...

  • 1

    What's New with Java EE 6?

    John Clingan GlassFish Group Product Manager

    Harpreet Singh GlassFish Product Marketing Manager

    1

  • 2

    Java EE: Past & Present

    JPEJPE ProjectProject

    J2EE 1.2J2EE 1.2 ServletServlet JSPJSP EJBEJB JMSJMS

    RMI/IIOPRMI/IIOP

    Enterprise Java Enterprise Java PlatformPlatform

    J2EE 1.3J2EE 1.3 CMPCMP

    ConnectorConnector ArchitectureArchitecture

    RobustnessRobustness

    J2EE 1.4J2EE 1.4 WebWeb

    Services Services Management Management DeploymentDeployment

    Async. Async. ConnectorConnector

    Java EE 5Java EE 5 Ease of Ease of Development Development AnnotationsAnnotations EJB 3.0EJB 3.0 PersistencePersistence New and New and Updated Updated Web Services Web Services

    Java EE 6 Pruning Extensibility Profiles Ease of Development EJB Lite RESTful Services Dependency Ejection

    Web Profile

    WebWeb ServicesServices

    Ease ofEase of DevelopmentDevelopment

    RightsizingRightsizing

  • 3

    08/.../08 Over 18M DownloadsOver 18M Downloads

    since FY'06since FY'06

    Active Users

    Java EE Adoption

    FY 06 FY 07 FY 08 FY 09 0

    2,000,000

    4,000,000

    6,000,000

    8,000,000

    10,000,000

    12,000,000

    Y/ Y D o w nlo a d G r o w t h

    Downloads

  • 4

    Compatible Java EE 5 Implementations

  • 5

    Java EE 6 Platform

    • Rightsizing > Flexible > Lighter weight

    • Extensible > Embrace Open Source

    Frameworks • Productive

    > Improve on Java EE 5

    Goals

  • 6

    Rightsizing the Platform: Profiles

    • Decouple specifications to allow more combinations

    • Expand potential licensee ecosystem

    • Profiles > Targeted technology bundles > Web Profile

    Platform Flexibility

  • 7

    Rightsizing the Platform

    • Fully functional mid-sized profile

    • Actively discussed > Expert Group > Industry

    • Technologies > Servlet 3.0, EJB Lite 3.1, JPA 2.0, JSP

    2.2, EL 1.2, JSTL 1.2, JSF 2.0, JTA 1.1, JSR 45, Common Annotations

    Web Profile

  • 8

    Rightsizing the Platform

    • Some technologies optional > Optional in next release > Deleted in subsequent release > Marked in Javadocs

    • Pruning list > JAX-RPC > EJB 2.x Entity Beans > JAXR > JSR-85 (Rules based Auth & Audit)

    Pruning (Deprecation)

  • 9

    Rightsizing the Platform

    • Embrace open source libraries and frameworks

    • Zero-configuration, drag-n- drop web frameworks > Servlets, servlet filters > Framework context listeners

    are discovered & registered • Plugin library jars using Web

    Fragments

    Extensibility

  • 10

    Ease of Development

    • Continue Java EE 5 advancements • Primary focus: Web Tier • Multiple areas easier to use: EJB 3.1 • General Principles

    > Annotation-based programming model > Reduce or eliminate need for

    deployment descriptors > Traditional API for advanced users

    Extensibility

  • 11

    Ease of Development Adding an EJB to a Web Application

    BuyBooks.warBuyBooks.war ShoppingCartShoppingCartEJB ClassEJB Class

    ShoppingCart.jarShoppingCart.jar

    BuyBooks.earBuyBooks.ear

    ShoppingCartShoppingCart EJB ClassEJB Class

    BuyBooks.warBuyBooks.war

  • 12

    Ease of Development - Annotations Servlet in Java EE 5: Create two source files

    MyServlet com.foo.MyServlet MyServlet /myApp/* ...

    /* Code in Java Class */

    package com.foo; public class MyServlet extends HttpServlet { public void doGet(HttpServletRequest req,HttpServletResponse res)

    {

    ...

    }

    ...

    }

  • 13

    Ease of Development - Annotations Java EE 6 Servlet: Single Source file (many cases)

    package com.foo; @WebServlet(name=”MyServlet”, urlPattern=”/myApp/*”) public class MyServlet {

    public void doGet(HttpServletRequest req, HttpServletResponse res)

    { ...

    }

  • 14

    Demo Java EE 6

  • 15

    Java Enterprise Edition 6

    • Most public reviews complete • JSR 330 Recently added

    > Revised schedule > Final release in Q4 2009

    • GlassFish v3 Preview > Reference Implementation

    Status

  • 16

    Java Enterprise Edition 6

    • Annotations for ease of development

    • Optional web.xml • Better defaults • Web Framework pluggability • Asynchronous Processing

    Servlet 3.0

  • 17

    Java Enterprise Edition 6

    • Useful for Comet, long waits • Must declare

    @WebServlet(asyncSupported=true)

    • Then Call AsyncContext ctx = ServletRequest.startAsync(req, res)

    • AsyncContext can then either: dispatch(String path) start(Runnable action)

    • Then paired with complete()

    Servlet 3.0 Asynchronous API

  • 18

    Java Enterprise Edition 6

    • Ease-of-use improvements • No-interface view

    > Once source file per bean • EJB inside web applications

    > No ejb-jar > Use WEB-INF/classes > Shared component environment

    • Portable JNDI

    EJB 3.1

  • 19

    Java Enterprise Edition 6

    • Singleton beans: @Singleton > Shared state > One instance per bean per JVM > Container/Bean managed security

    @ConcurrencyManagement

    • Lightweight asynchronicity > Async business methods

    @Asynchronous > Methods must return

    void or Future

    EJB 3.1

  • 20

    Java Enterprise Edition 6

    • Enhanced EJB Timer Service > Cron-like scheduling > Initialization-time timer creation

    @Schedule(dayOfWeek=”Mon/Wed”)

    • Embeddable EJB Container > Use in JavaSE environments > Bootstrapping API

    EJBContainer

    EJB 3.1

  • 21

    Java Enterprise Edition 6 Enterprise Java Beans 3.1 Features

    EJB 3.1 Lite EJB 3.1 Local Session Beans PP PP Declarative Security PP PP

    Transactions (CMT/BMT) PP PP Interceptors PP PP Security PP PP Message Driven Beans PP RMI/IIOP Interop. & Remote View PP EJB 2.x Backwards Compatability PP Timer Service PP Asynchronous PP

  • 22

    Java Enterprise Edition 6

    • Java Persistence Architecture 2.0 > Improve object/relational mapping

    • Java Contexts & Dependency Injection (AKA - “Web Beans”)

    • Java Server Faces 2.0 > AJAX > Simplified component creation

    • JAX-RS 1.1 – RESTful services

    Additional Features

  • 23

    GlassFish v3

  • 24

    Top Features

    GlassFish v3

    • Java EE 6 support • Developer Productivity • Modular • Extensible • Embeddable • Observable

  • 25

    Java EE 6 Support

    GlassFish v3

    • Java EE 6 Reference Implementation

    • Downloadable bundles* > Web Profile > Java EE 6

    * https://glassfish.dev.java.net/public/downloadsindex.html

  • 26

    GlassFish v3 Features

    • Getting Started > Small download > Fast startup time > Intuitive user interface

    • Using GlassFish > Low resource utilization > Command Line Interface > Maven support > Included in Netbeans and GlassFish Tools

    Bundle for Eclipse > Rapid iterative development

    Developer Productivity

  • 27

    GlassFish v3 Features

    • Modularity/OSGi • Extensible • RESTful administration API • Fine-grained monitoring

    Wait, there's more ...

  • 28

    Flexible AdministrationFlexible Administration

    GlassFish v3 Screen Snapshots

  • 29

    Alternative Languages

    GlassFish Enterprise Server v3

    • Can deploy as web application • New to GlassFish v3

    > Jruby/Jython modules > No web container > Dynamic pooling of JRuby

    containers

  • 30

    Demo Update Center

  • 31

    Roadmap

    GlassFish Enterprise Server v3

    • GlassFish Enterprise Server v2.1 – Feb 2009

    • GlassFish Enterprise Server v3 Prelude – Oct 2009

    • GlassFish v3 – Nov 24, 2009*

    * http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishV3Schedule

  • 32

    Summary Java EE 6 GlassFish v3

    • Right-Sizing • Extensible • Ease of

    use/development

    • Java EE 6 • Modular • Extensible • Developer

    productivity

  • 33

    Enterprise Subscriptions

    Sun GlassFish Enterprise Server

    • 24x7x365 Support, Patches • Enterprise Manager • Supported releases

    > GlassFish Enterprise Server v2.x > GlassFish Enterprise Server v3

    Prelude • Contact [email protected] to learn

    more

    mailto:[email protected]