What's New with Java EE 6? · Java EE: Past & Present JPE Project J2EE 1.2 Servlet JSP EJB JMS...

Post on 02-Aug-2020

2 views 0 download

Transcript of What's New with Java EE 6? · Java EE: Past & Present JPE Project J2EE 1.2 Servlet JSP EJB JMS...

1

What's New with Java EE 6?

John ClinganGlassFish Group Product Manager

Harpreet SinghGlassFish Product Marketing Manager

1

2

Java EE: Past & Present

JPEJPEProjectProject

J2EE 1.2J2EE 1.2

ServletServlet

JSPJSP

EJBEJB

JMSJMS

RMI/IIOPRMI/IIOP

Enterprise Java Enterprise Java PlatformPlatform

J2EE 1.3J2EE 1.3

CMPCMP

ConnectorConnectorArchitectureArchitecture

RobustnessRobustness

J2EE 1.4J2EE 1.4

WebWebServices 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

WebWebServicesServices

Ease ofEase ofDevelopmentDevelopment

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 090

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

ShoppingCartShoppingCartEJB ClassEJB Class

BuyBooks.warBuyBooks.war

12

Ease of Development - Annotations

Servlet in Java EE 5: Create two source files

<!--Deployment descriptor web.xml -->

<web-app>

<servlet><servlet-name>MyServlet

</servlet-name> <servlet-class> com.foo.MyServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>MyServlet </servlet-name> <url-pattern>/myApp/* </url-pattern> </servlet-mapping> ... </web-app>

/* 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

DemoJava 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 CallAsyncContext 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 <T>

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

DemoUpdate 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 glassfish@sun.com to learn more

Sun Software Subscriptions - Paying at the point of value

Source Code• Binary Product• Simple Training• Security Help• Developer/Tools/Tips

Subscription Agreements• Global Phone and Web Support• Issue Escalation Process• Subscription-only Product Features• Traditional Contractual Coverages• Services & Training

Open Source Supported Software

35

GlassFish Enterprise Server

Sun software - a simple approach to support

You may use phone or web to contact our experts 24 hours a day, worldwide. Get the experience and issue resolution necessary help to keep your business running!

Ability to escalate bugs to an out of cycle patch or engineering attention; you have visibility into the issue resolution process.

Access to Sun Knowledge Base.Technical support assistance backed by the engineers who wrote &/or

solidified the code.Proactive Sun Alerts and Notifications.Low risk, tested fixes and features for mission critical deployments Access to aggregated content like bugs fixed, docs, latest news,

promotions and tech tips

36

GlassFish Enterprise Server

Why Else should I subscribe?

Subscription-Exclusive Features:GlassFish Enterprise Manager - • SNMP Monitoring

• Application Server Tuning

• Alerts (CPU Usage Trends, Memory Alerts, etc.)

GlassFish Update Center - • Delivers GlassFish add-on components, updates & provides mechanism to

enable community contributions.

• Use Update Center to get latest and greatest technology binaries.

• Provides the service, access and installation of updates patches available.

Contractual Coverage: Optional indemnification & Limitation of Liability

Who's Using GlassFish In Production?

Questions? GlassFish@Sun.COM

38

Q&A