Td Mxc Javaee Chen

download Td Mxc Javaee Chen

of 71

Transcript of Td Mxc Javaee Chen

  • 8/14/2019 Td Mxc Javaee Chen

    1/71

    1

    Java EE, GlassFishand their future

    Doris Chen Ph.D.Principal Engineer/Technology EvangelistSun Microsystems, Inc.

    1

  • 8/14/2019 Td Mxc Javaee Chen

    2/71

    2

    Agenda

    > Java EE 5 Overview> Project GlassFish

    > What is GlassFish?> GlassFish v2 Main Feature and

    Technology> Future Direction> Call to Action, Summary and

    Resources

    2

  • 8/14/2019 Td Mxc Javaee Chen

    3/71

    Java EE 5.0 = (J2EE 1.4).next

    Java EE 5 Theme: Ease of Development

    POJO-based programming> More freedom, fewer requirements

    Extensive use of annotations> Reduced need for deployment descriptors> Annotations are the default

    Configure by exception> Reasonable defaults wherever possible

    Resource Injection

    New APIs and frameworks

    > EJB3, JAXB 2, JAX-WS, JSF, ...

  • 8/14/2019 Td Mxc Javaee Chen

    4/71

    Specification Changes in Java EE 5

    JAX-WS 2.0 & JSR 181

    Java Persistence

    EJB 3.0

    JAXB 2.0

    JavaSever Faces 1.2 new to Platform

    JSP 2.1 Unification w/ JSF 1.2

    StAX Pull Parser new to Platform, JSR 173

  • 8/14/2019 Td Mxc Javaee Chen

    5/71

    HelloService

    WEB-INF/wsdl/HelloService.wsdl

    WEB-INF/HelloService-mapping.xml

    HelloService

    wsdl-port_ns:HelloServiceSEIPort

    endpoint.HelloServiceSEI

    WSServlet_HelloService

    package endpoint;import java.rmi.*;

    public class HelloServiceImplimplements HelloServiceSEI {

    public String sayHello(String param)throws java.rmi.RemoteException {return Hello + param;

    }}

    package endpoint;import java.rmi.*;

    public interface HelloServiceSEIextends java.rmi.Remote {

    public String sayHello(String param)throws java.rmi.RemoteException;

    }

    Using JAX-RPC 1.1

    OLD! J2EE 1.4

  • 8/14/2019 Td Mxc Javaee Chen

    6/71

    Using JAX-WS 2.0

    import javax.jws.WebService;

    @WebService

    public class MySimpleWS {

    public String sayHello(String s) {

    return "Hello " + s;

    }

    }

    NEW! Java EE 5

  • 8/14/2019 Td Mxc Javaee Chen

    7/71

    Stateless Session Bean in Java EE 5

    import javax.jws.WebService;

    import javax.ejb.Stateless;

    @WebService

    @Stateless

    public class MySimpleWS {

    public String sayHello(String s) {

    return "Hello " + s;

    }

    }

    NEW! Java EE 5

  • 8/14/2019 Td Mxc Javaee Chen

    8/71

    Context initial = new InitialContext();

    Context myEnv = (Context)initial.lookup("java:comp/env");

    Object objref = myEnv.lookup("ejb/SimpleConverter");

    ConverterHome home =(ConverterHome)PortableRemoteObject.narrow(objref,

    ConverterHome.class);

    Converter currencyConverter = home.create();

    EJB References in Java EE 5

    NEW! Java EE 5

    OLD! J2EE 1.4@EJB Converter currencyConverter;

  • 8/14/2019 Td Mxc Javaee Chen

    9/71

    //// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v@@BUILD_VERSION@@// See http://java.sun.com/xml/jaxb// Any modifications to this file will be lost upon recompilation of the source schema.

    // Generated on: 2005.04.21 10:37:56 PDT//

    package generated.impl;

    public class PointTypeImpl implements generated.PointType, com.sun.xml.bind.JAXBObject, generated.impl.runtime.UnmarshallableObject, generated.impl.runtime.XMLSerializable, generated.impl.runtime.ValidatableObject{

    protected boolean has_Y;protected float _Y;protected boolean has_X;protected float _X;public final static java.lang.Class version = (generated.impl.JAXBVersion.class);private static com.sun.msv.grammar.Grammar schemaFragment;

    private final static java.lang.Class PRIMARY_INTERFACE_CLASS() {return (generated.PointType.class);

    }

    public float getY() {return _Y;

    }

    public void setY(float value) {_Y = value;has_Y = true;

    }

    public float getX() {return _X;

    }

    public void setX(float value) {_X = value;has_X = true;

    }

    public generated.impl.runtime.UnmarshallingEventHandler createUnmarshaller(generated.impl.runtime.UnmarshallingContext context) {return new generated.impl.PointTypeImpl.Unmarshaller(context);

    }

    public void serializeBody(generated.impl.runtime.XMLSerializer context)throws org.xml.sax.SAXException

    {if (!has_Y) {

    context.reportError(com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "Y"));}if (!has_X) {

    context.reportError(com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "X"));}

    context.startElement("", "x");context.endNamespaceDecls();context.endAttributes();try {

    context.text(javax.xml.bind.DatatypeConverter.printFloat(((float) _X)), "X");} catch (java.lang.Exception e) {

    generated.impl.runtime.Util.handlePrintConversionException(this, e, context);}context.endElement();context.startElement("", "y");context.endNamespaceDecls();context.endAttributes();try {

    context.text(javax.xml.bind.DatatypeConverter.printFloat(((float) _Y)), "Y");} catch (java.lang.Exception e) {

    generated.impl.runtime.Util.handlePrintConversionException(this, e, context);}context.endElement();

    }

    public void serializeAttributes(generated.impl.runtime.XMLSerializer context)throws org.xml.sax.SAXException

    {if (!has_Y) {

    context.reportError(com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "Y"));}if (!has_X) {

    context.reportError(com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "X"));}

    }

    public void serializeURIs(generated.impl.runtime.XMLSerializer context)throws org.xml.sax.SAXException

    {if (!has_Y) {

    context.reportError(com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "Y"));}if (!has_X) {

    context.reportError(com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "X"));}

    }

    public java.lang.Class getPrimaryInterface() {return (generated.PointType.class);

    }

    public com.sun.msv.verifier.DocumentDeclaration createRawValidator() {if (schemaFragment == null) {

    schemaFragment = com.sun.xml.bind.validator.SchemaDeserializer.deserialize(("\u00ac\u00ed\u0000\u0005sr\u0000\u001fcom.sun.msv.grammar.SequenceExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000\u001dcom.su"+"n.msv.grammar.BinaryExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0002L\u0000\u0004exp1t\u0000 Lcom/sun/msv/gra"+"mmar/Expression;L\u0000\u0004exp2q\u0000~\u0000\u0002xr\u0000\u001ecom.sun.msv.grammar.Expressi"+"on\u00f8\u0018\u0082\u00e8N5~O\u0002\u0000\u0002L\u0000\u0013epsilonReducibilityt\u0000\u0013Ljava/lang/Boolean;L\u0000\u000b"+"expandedExpq\u0000~\u0000\u0002xpppsr\u0000\'com.sun.msv.grammar.trex.ElementPatt"+"ern\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0001L\u0000\tnameClasst\u0000\u001fLcom/sun/msv/grammar/NameClass;"+"xr\u0000\u001ecom.sun.msv.grammar.ElementExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0002Z\u0000\u001aignoreUndecl"+"aredAttributesL\u0000\fcontentModelq\u0000~\u0000\u0002xq\u0000~\u0000\u0003pp\u0000sq\u0000~\u0000\u0000ppsr\u0000\u001bcom.s"+"un.msv.grammar.DataExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0003L\u0000\u0002dtt\u0000\u001fLorg/relaxng/dataty"+"pe/Datatype;L\u0000\u0006exceptq\u0000~\u0000\u0002L\u0000\u0004namet\u0000\u001dLcom/sun/msv/util/String"+"Pair;xq\u0000~\u0000\u0003ppsr\u0000\"com.sun.msv.datatype.xsd.FloatType\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002"+"\u0000\u0000xr\u0000+com.sun.msv.datatype.xsd.FloatingNumberType\u00fc\u00e3\u00b6\u0087\u008c\u00a8|\u00e0\u0002\u0000\u0000"

    +"xr\u0000*com.sun.msv.datatype.xsd.BuiltinAtomicType\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000"+"%com.sun.msv.datatype.xsd.ConcreteType\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000\'com.sun"+".msv.datatype.xsd.XSDatatypeImpl\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0003L\u0000\fnamespaceUrit\u0000"+"\u0012Ljava/lang/String;L\u0000\btypeNameq\u0000~\u0000\u0014L\u0000\nwhiteSpacet\u0000.Lcom/sun/"+"msv/datatype/xsd/WhiteSpaceProcessor;xpt\u0000 http://www.w3.org/"+"2001/XMLSchemat\u0000\u0005floatsr\u00005com.sun.msv.datatype.xsd.WhiteSpac"+"eProcessor$Collapse\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000,com.sun.msv.datatype.xsd.W"+"hiteSpaceProcessor\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xpsr\u00000com.sun.msv.grammar.Expre"+"ssion$NullSetExpression\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xq\u0000~\u0000\u0003ppsr\u0000\u001bcom.sun.msv.ut"+"il.StringPair\u00d0t\u001ejB\u008f\u008d\u00a0\u0002\u0000\u0002L\u0000\tlocalNameq\u0000~\u0000\u0014L\u0000\fnamespaceURIq\u0000~\u0000"+"\u0014xpq\u0000~\u0000\u0018q\u0000~\u0000\u0017sr\u0000\u001dcom.sun.msv.grammar.ChoiceExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xq\u0000"+"~\u0000\u0001ppsr\u0000 com.sun.msv.grammar.AttributeExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0002L\u0000\u0003expq\u0000"+"~\u0000\u0002L\u0000\tnameClassq\u0000~\u0000\u0007xq\u0000~\u0000\u0003sr\u0000\u0011java.lang.Boolean\u00cd r\u0080\u00d5\u009c\u00fa\u00ee\u0002\u0000\u0001Z\u0000"+"\u0005valuexp\u0000psq\u0000~\u0000\u000bppsr\u0000\"com.sun.msv.datatype.xsd.QnameType\u0000\u0000\u0000\u0000"+"\u0000\u0000\u0000\u0001\u0002\u0000\u0000xq\u0000~\u0000\u0011q\u0000~\u0000\u0017t\u0000\u0005QNameq\u0000~\u0000\u001bq\u0000~\u0000\u001dsq\u0000~\u0000\u001eq\u0000~\u0000)q\u0000~\u0000\u0017sr\u0000#com."+"sun.msv.grammar.SimpleNameClass\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0002L\u0000\tlocalNameq\u0000~\u0000\u0014L"+"\u0000\fnamespaceURIq\u0000~\u0000\u0014xr\u0000\u001dcom.sun.msv.grammar.NameClass\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001"+"\u0002\u0000\u0000xpt\u0000\u0004typet\u0000)http://www.w3.org/2001/XMLSchema-instancesr\u00000"+"com.sun.msv.grammar.Expression$EpsilonExpression\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000x"+"q\u0000~\u0000\u0003sq\u0000~\u0000$\u0001psq\u0000~\u0000+t\u0000\u0001xt\u0000\u0000sq\u0000~\u0000\u0006pp\u0000sq\u0000~\u0000\u0000ppq\u0000~\u0000\u000esq\u0000~\u0000 ppsq\u0000~"+"\u0000\"q\u0000~\u0000%pq\u0000~\u0000&q\u0000~\u0000-q\u0000~\u00001sq\u0000~\u0000+t\u0000\u0001yq\u0000~\u00005sr\u0000\"com.sun.msv.gramma"+"r.ExpressionPool\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0001L\u0000\bexpTablet\u0000/Lcom/sun/msv/gramma"+"r/ExpressionPool$ClosedHash;xpsr\u0000-com.sun.msv.grammar.Expres"+"sionPool$ClosedHash\u00d7j\u00d0N\u00ef\u00e8\u00ed\u001c\u0003\u0000\u0003I\u0000\u0005countB\u0000\rstreamVersionL\u0000\u0006par"+"entt\u0000$Lcom/sun/msv/grammar/ExpressionPool;xp\u0000\u0000\u0000\u0005\u0001pq\u0000~\u0000\u0005q\u0000~\u0000!"+"q\u0000~\u00008q\u0000~\u0000\nq\u0000~\u00007x"));

    }return new com.sun.msv.verifier.regexp.REDocumentDeclaration(schemaFragment);

    }public class Unmarshaller

    extends generated.impl.runtime.AbstractUnmarshallingEventHandlerImpl{

    public Unmarshaller(generated.impl.runtime.UnmarshallingContext context) {super(context, "-------");

    }

    protected Unmarshaller(generated.impl.runtime.UnmarshallingContext context, int startState) {this(context);state = startState;

    }

    JAXB 1.0 in J2EE 1.4

    Generated Code...

    308 lines for

    12 38 files

    219KB of code in total

    publicjava.lang.Objectowner(){returngenerated.impl.PointTypeImpl.this;

    }

    publicvoid enterElement(java.lang.String___uri,java.lang.String___local,java.lang.String___qname,org.xml.sax.Attributes __atts)throwsorg.xml.sax.SAXException

    {int attIdx;outer:while(true) {

    switch(state) {ca se 3 :

    if(("y"== ___local)&&(""==___uri)){context.pushAttributes(__atts,true);state =4;return ;

    }break;

    ca se 0 :if(("x"== ___local)&&(""==___uri)){

    context.pushAttributes(__atts,true);state =1;return ;

    }break;

    ca se 6 :revertToParentFromEnterElement(___uri,___local,___qname, __atts);return;

    }super.enterElement(___uri,___local,___qname,__atts);break;

    }}

    publicvoid leaveElement(java.lang.String___uri,java.lang.String___local,java.lang.String ___qname)throwsorg.xml.sax.SAXException

    {int attIdx;outer:while(true) {

    switch(state) {ca se 2 :

    if(("x"== ___local)&&(""==___uri)){context.popAttributes();state =3;return ;

    }break;

    ca se 6 :revertToParentFromLeaveElement(___uri,___local,___qname);return;

    ca se 5 :if(("y"== ___local)&&(""==___uri)){context.popAttributes();state =6;return ;

    }break;

    }super.leaveElement(___uri,___local,___qname);break;

    }}

    publicvoid enterAttribute(java.lang.String___uri,java.lang.String___local,java.lang.String ___qname)

    }

    }

    }

    OLD! J2EE 1.4

  • 8/14/2019 Td Mxc Javaee Chen

    10/71

    JAXB 2.0 in Java EE 5

    Generated Code...@XmlAccessorType(FIELD)@XmlType(name = "", propOrder = {"x","y"})@XmlRootElement(name = "point")public class Point {

    protected float x;protected float y;

    public float getX() {return x;

    }public void setX(float value) {

    this.x = value;

    }

    public float getY() {return y;

    }public void setY(float value) {

    this.y = value;

    }}

    62 lines for

    12

    2 files

    3KB of code in total

    NEW! Java EE 5

  • 8/14/2019 Td Mxc Javaee Chen

    11/71

    How much easier is it?

    J2EE 1.4 Java EE 5

    Number of Java files 17 7

    Lines of code (Java) 987 716

    Number of XML Files 9 1

    Lines of code (XML) 792 5

    RosterApp1

    [1] Source: Raghu Kodali,Oracle

  • 8/14/2019 Td Mxc Javaee Chen

    12/71

    Java EE 5.0 SummaryHow is it easier?

    J2EE 1.4 Deployment

    descriptors

    Required containerinterfaces

    JNDI Lookups

    Deployment descriptor,

    interfaces No Supported UI

    Framework

    Java EE Java language

    annotations @

    Plain Old Java Objects(POJOs)

    Dependency Injection

    More and better

    defaults Java Server Faces

    (JSF)

  • 8/14/2019 Td Mxc Javaee Chen

    13/71

    13

    Agenda

    > Java EE 5 Overview> Project GlassFish

    > What is GlassFish?> GlassFish v2 Main Feature and

    Technology> Future Direction> Call to Action, Summary and

    Resources

    13

  • 8/14/2019 Td Mxc Javaee Chen

    14/71

    Various Interface21ers, including Costin and Juergen, havetaken a look at GlassFish and given it the thumbs up.

    Rod Johnson, Spring Framework Creator, Feb. 2007 [1]

    [1]: blog.interface21.com, Feb. 2007

  • 8/14/2019 Td Mxc Javaee Chen

    15/71

    ... we were seriously stressed when IBM declared war with Geronimoand then HP got in the game against us too. Red Hat and JOnAS

    didn't scare us at all (really not at all), nor did we worry aboutSun's foray into the market. Oddly enough, of that group only Sunhas managed to mountserious competition to JBoss.

    Marc Fleury, JBoss founder, August 2007 [2]

    [2]: news.com, August 2007

  • 8/14/2019 Td Mxc Javaee Chen

    16/71

    Among major vendors, Sun Microsystems Inc., has dramatically

    improvedits standing in this year's evaluation of applicationsservers for service-oriented architecture (SOA) and businessprocess management (BPM)

    Forrester Research, August 2007 [3]

    Sun and the GlassFish open-source community have delivered thefirst production-scale open-source Java EE 5 application server.This challenges the dominance of market leaders like Red Hat and

    IBM.Gartner, September 2007 [4]

    [3]: http://www.forrester.com/Research/Document/0,,37138,00.html, August 2007

    [4]: http://www.gartner.com/DisplayDocument?doc_cd=152044&ref=g_rss, September 2007

  • 8/14/2019 Td Mxc Javaee Chen

    17/71

    What Is GlassFish? A Java EE 5 compliant Application Server

    > GlassFish v1 is Sun AS 9.0 PE> GlassFish v2 is Sun AS 9.1

    Enterprise Quality>

    Sun Java System Application Server 9.x> Use it in production!

    Open Source> CDDL (like OpenSolaris, NetBeans)

    > GPLv2 (like Java and NetBeans) Community at http://glassfish.java.net

    > Sources, bug DBs, discussions at Java.Net> Roadmaps, Architecture Documents

  • 8/14/2019 Td Mxc Javaee Chen

    18/71

    Timeline of ProjectGlassFish

    TomcatJasper

    CatalinaJSTLStruts

    Crimson

    XSLTCXalanXerces

    JAXBJAX-RPC

    JSF

    J1'05June 2005

    J1'06May 2006

    GlassFish

    Launch

    v1

    Sept.2007

    v2v1 UR1

    Sept.2007

    v2 UR1

    May.2008

    v2 UR2

    Dec.2007

    v3 TP2

  • 8/14/2019 Td Mxc Javaee Chen

    19/71

    The GlassFish AppServer

    GlassFish v1> Java EE 5 Compliance!> Production Quality with Growing # of Deployments> Sun Distro - SJS AS 9.0

    GlassFish v2> New WS stack with Metro> High performance and Production quality> Startup time, Load balancing, cluster management, Failover

    > Some scripting support> Sun Distro SJS AS 9.1

    GlassFish v3> Modularization, better scripting support

  • 8/14/2019 Td Mxc Javaee Chen

    20/71

    GlassFish Today

    HK2

    ShoalGrizzly

    Metro

    JAXB

    JSF/Mojarra

    WebTier

    JSP

    Jersey

    Woodstox

    @Codehaus

    EclipseLink@Eclipse

    Felix@ASF

    OpenMQ

    OpenESB

    GlassFish Server

    jMaki

    Hudson

    Phobos

    SlynkrOther

    SocialSoftware

    AS CoreEJB

    Others

    Woodstock

    [email protected]

  • 8/14/2019 Td Mxc Javaee Chen

    21/71

    (Some) Distributions & Contributors

    ProjectGlassFish

    Sun Java SystemAS 9.x

    Derby

    Open ESB

    Portal Server

    MQ

    Distributions

    Maven Rep

    Java EE RI & SDK CommunitiesNetBeansIDE

    NetBeans 5.5, 6.0Tools

    Eclipse Plugin

    Users and Other Groups

    TmaxSoft JEUS 6

    Oracle oc4j

    BEA WebLogic 10

    JBoss 5

    SailFinEricsson

  • 8/14/2019 Td Mxc Javaee Chen

    22/71

    Productivity From Your Perspective

    JSPwiki

    MyFacesADF

    Integration ORB

    BIRT

    AJAX

    Shale

    Apache Httpd

    Dalma

    Facelets

    OSCache

    SiteMesh

    StringBeans Portal

    Tapestry

    WebDAV

    OSWorkFlow

    CJUG-Classifieds

    BlogTrader WebSphere MQ

    DOJOOpen ESB

    OpenSSOSeams

  • 8/14/2019 Td Mxc Javaee Chen

    23/71

    Tools Support

    NetBeans 5.5.1, 6.0.1, 6.1 Best integration with :

    > full Java EE 5 support> resource creation> remote debug> incremental deployment> profiling> wizards, etc...

    Additional features (SOA,UML, jRubyOnRails, ...)

    GlassFish (v1, v2, v3)plugin for Eclipse 3.3(Europa)

    Genuitec's MyEclipseoffers greater integrationbetween IDE andGlassFish

    CodeGear JBuilder 2007

    IDEA Intellij 6.0, 7.0

  • 8/14/2019 Td Mxc Javaee Chen

    24/71

    Helping You Grow

  • 8/14/2019 Td Mxc Javaee Chen

    25/71

    GlassFish Adoption Storieshttp://blogs.sun.com/stories

    iTAC Software Manufacturing ExecutionSystems (MES)> using GlassFish to provide direct connection

    between shop floor devices in manufacturing plants> 3 million calls a day: uses EJBs, rich IIOP clients,

    and the Java Connector Architecture

    Wotif.com> Large # hits, 10,000 concurrent sessions, 1

    million users/110,000 bookings monthly> Hibernate, Struts, Spring, and ehCache /

    Horizontal Scaling Harvard University

    > On-line archive for sharing data within andacross universities

    >NetBeans, the Lucene search engine,PostgreSQL database, Shale standalone tiles

  • 8/14/2019 Td Mxc Javaee Chen

    26/71

    Some Adoption Indicators

    88K Registrations in 4.5 months +4.5 M downloads in last 12

    months

    +2.5M hits in 13 mo

    +310K different IPs

  • 8/14/2019 Td Mxc Javaee Chen

    27/71

    GlassFish RoadMap

    6/055/06

    v1 fcs

    9/07

    v2 fcs

    12/07

    v2 UR1

    5/07

    v2 UR2

    Sailfin fcs

    Sustaining train

    v1 UR1

    Sustaining train6/08 7/08 9/08

    v2.1Fall/07

    etc...

    v3 TP2

    Sailfin beta

    v3 fcs

    4/09

    Java EE 6 fcs

    1.25/08

    Metro 1.1.26/08

    1.37/08

    Jersey 0.86/08

    1.09/08

    Grizzly 1.8.05/08

    2.012/08

    JSF/Mojarra 2.09/08

  • 8/14/2019 Td Mxc Javaee Chen

    28/71

    Ease of Use Clustering HA DB Support Centralized Admin Documentation Advanced Monitoring Web 2.0 Support AJAX, Woodstock, Comet, JRuby Best Web Services, w/ .NET Interop Fastest Open Source AppServer

    See SPECjAppServer 2004 results

    Production Ready

    Disclaimers: SPEC and the benchmark name SPECjAppServer 2004 are registered trademarks of the Standard Performance Evaluation Corporation. Competitive benchmarkresults stated

    above reflect results published on www.spec.org as of 11/21/07. The comparison presented is based on GlassFish v2 UR1 run on 6 Sun SPARC Enterprise T5120 (1 chip, 8cores/chip, 8 threads/core)1.4GHz 8,439.36 SPECjAppServer2004 JOPS@Standard. For the latest SPECjAppServer 2004 benchmark results, visithttp://www.spec.org/.

    http://www.spec.org/mailto:JOPS@Standardhttp://www.spec.org/http://www.spec.org/http://www.spec.org/mailto:JOPS@Standardhttp://www.spec.org/
  • 8/14/2019 Td Mxc Javaee Chen

    29/71

    GlassFish Open Source Business Model

    Free Right-to-Use Start Now Optional Free Registration Stay in Touch

    Subscription Support From the Source

    > Sustaining Patches> Indemnification> World-Wide Support> Affordable - from $4,500 for 4 sockets

    > Look for Additional Price Points Consulting & Training

  • 8/14/2019 Td Mxc Javaee Chen

    30/71

    GlassFish Support Pricing

    Yes! GlassFish is totally free to use The business model for Sun is that of services

    > Support subscription starting from $4 500 for 4 sockets> Premium support and volume pricing available> Support from the source to secure your projects

    Also Consulting & Training

    All from Sun & Partners

    We want our partners, ourcustomers to be successful(and Sun too in the process)

    A d

  • 8/14/2019 Td Mxc Javaee Chen

    31/71

    31

    Agenda

    > Java EE 5 Overview> Project GlassFish

    > What is GlassFish?> GlassFish v2 Main Feature and

    Technology> Future Direction> Call to Action, Summary and

    Resources

    31

  • 8/14/2019 Td Mxc Javaee Chen

    32/71

    GlassFish v2SJS Application Server 9.1

    Metro Web Services Stack> Performance, Microsoft interoperability

    Clustering, Load-Balancing, HA> Advanced Management

    JBI support (OpenESB 2.0) Better user experience

    > Single, smaller, download>

    Multiple Profiles (Developer, Cluster, Enterprise)> Better startup time> Update Center> New admin console: JSF, AJAX, Charts

    World Record Performance

    Available!

  • 8/14/2019 Td Mxc Javaee Chen

    33/71

  • 8/14/2019 Td Mxc Javaee Chen

    34/71

    JAX-WS RI vs Axis2

  • 8/14/2019 Td Mxc Javaee Chen

    35/71

    Clustering Architecture

    JMSHTTP(S) RMI/IIOP

    Databases

    Applicationsand Config

    CustomResources

    Message routing/failover/load balancing

    Node A Node B Node NClustered

    Instances

    ResourceAdapters

    AS

    ASASAS AS AS AS

    HA Application State RepositoryM

    anagement

  • 8/14/2019 Td Mxc Javaee Chen

    36/71

    Clustering in GlassFish v2

    asadmin>

    Java EE ServerInstance

    JMXAPI

    JMX API

    JMX API

    Node 1

    Node 2

    Node Agent

    Administration Node

    Node Agent

    DomainAdministration

    Server(DAS)

    Applications

    Resources

    Configuration

    JMX = Java Management Extensions

  • 8/14/2019 Td Mxc Javaee Chen

    37/71

    Dynamic Clustering and In-MemoryReplication

    GMS with Project Shoal> http://shoal.dev.java.net> Dynamic clusters implemented with JXTA by default

    > Extreme ease of use in cluster setup Replication

    > What?> HTTP session state

    > Stateful EJB session state> Single Sign-On state> Container state (timers, ...)

    > How?> Default is In-Memory replication with JXTA

    > Can still use HADB for 99.999% uptime (higher perf degradation)

    http://shoal.dev.java.net/http://shoal.dev.java.net/
  • 8/14/2019 Td Mxc Javaee Chen

    38/71

  • 8/14/2019 Td Mxc Javaee Chen

    39/71

    Management Features

    Centralized, secure, remote access> Accessible as GUI, CLI, IDEs, Java-based programs

    > Also available via provided ANT tasks

    > JMX & Application Server Management eXtensions, AMX

    > Can be monitored throughjConsole and others

    Per-service monitoring levels

    Call Flow

    Self Management Resource consumption management

  • 8/14/2019 Td Mxc Javaee Chen

    40/71

    JBI Java Business Integration

    OpenESB 2.0 implementation> Included in GlassFish v2> Integrated as a life-cycle module> Integrated admin tools (Web and CLI)

    Many components available from openesb.org> Binding Components: HTTP, File, FTP, JMS, TCP, CICS, HL7, ...> Service Engines: BPEL, XSLT, ETL, SQL, Scripting, Worklist, ...> https://open-esb.dev.java.net/Components.html

    Tools support> NetBeans SOA 6.0

    Possible to plug ServiceMix into GlassFish v2> Support wider JBI story

    https://open-esb.dev.java.net/Components.htmlhttps://open-esb.dev.java.net/Components.html
  • 8/14/2019 Td Mxc Javaee Chen

    41/71

    AJAX and Scripting Activities

    jMaki - http://ajax.dev.java.net> Encapsulates very easily AJAX widgets

    Phobos - http://phobos.dev.java.net> Scripting on the Server

    DynaFaces - http://jsf-extensions.dev.java.net> Ajax and JavaServer Faces

    Blueprints - http://bpcatalog.dev.java.net

    > Guidelines on many areas, including AJAX JRuby -

    > http://wiki.glassfish.java.net/Wiki.jsp?page=JRuby

    http://phobos.dev.java.net/http://jsf-extensions.dev.java.net/http://bpcatalog.dev.java.net/http://wiki.glassfish.java.net/Wiki.jsp?page=JRubyhttp://wiki.glassfish.java.net/Wiki.jsp?page=JRubyhttp://bpcatalog.dev.java.net/http://jsf-extensions.dev.java.net/http://phobos.dev.java.net/
  • 8/14/2019 Td Mxc Javaee Chen

    42/71

    jMaki

    'j' stands for JavaScript. Maki means to wrap in Japanese Framework for encapsulating AJAX libraries and widgets

    from Dojo, Yahoo!, scriptaculous, Google, and more

    Usable with JSP, JSF, PHP and Ruby on Rails

    Easy to build your own widget

    Common event model and proxy architecture

    Automatic handling of JavaScript resource files

    V 1.0 released

    http://ajax.dev.java.net and http://widget.dev.java.net

    http://ajax.dev.java.net/http://widget.dev.java.net/http://widget.dev.java.net/http://ajax.dev.java.net/
  • 8/14/2019 Td Mxc Javaee Chen

    43/71

    Web Tier

    JSP Container> 10x perf. improvement in JSP compilation (JSR-199)

    Grizzly> Improved over GlassFish v1

    > Very Flexible and Customizable> Non-blocking SSL, Quality of Service constraints> Scalable Async Req Processing (ARP)> Supports Comet(long-term HTTP connections)

    Hosting features> Alternate docroots> Webcontainer dynamically reconfigurable

    I t d ti t G i l

  • 8/14/2019 Td Mxc Javaee Chen

    44/71

    What Is the Grizzly HTTP Framework?

    Introduction to Grizzly

    Grizzly is a HTTP framework> Uses lower level Java NIO primitives> Easy-to-use, high-performance APIs for socket

    communications

    Grizzly brings non-blocking sockets to theHTTP processing layer

    Grizzly integrates with the current Apache Tomcat HTTPConnector architecture (Coyote)> Coyote is currently used in Tomcat 3.x/4.x/5.x

    Grizzly replaces Apache Tomcat Coyote HTTP front-endand thread pool> Utilizes its high performant buffers and

    parsing classes

  • 8/14/2019 Td Mxc Javaee Chen

    45/71

    B h k R lt

  • 8/14/2019 Td Mxc Javaee Chen

    46/71

    Benchmark Results

    2 CPU 6 CPU 16 CPU0

    250

    500

    750

    1000

    1250

    1500

    17502000

    2250

    2500

    2750

    3000 Traditional I/O

    C-Based Server

    C-Based Server

    Grizzly

    %o

    fTraditionalI/OS

    core

  • 8/14/2019 Td Mxc Javaee Chen

    47/71

    Demo

    Grizzly Comet and jMaki: interactive Flickr based Chat Comet (request polling):

    > Builds on top of Grizzly ARP (Asynchronous Request Process)> Enables web servers to send data to client without client

    request> Allows creation of event-driven web application which are

    hosted in browser

    GlassFish supports Comet

    > Enable Coment without restart the server

  • 8/14/2019 Td Mxc Javaee Chen

    48/71

    Top Link Essentials / JPA

    JPA now a separate JSR> 1.0 very well accepted> Does not require a container

    Oracle Contribution to GlassFish> Fully JPA-compliant and open source

    Very Active Community> Oracle, Sun, TmaxSoft, independents> Mail: [email protected]

    Pluggable (per spec)> In GlassFish, JEUS, JOnAS, Tomcat, Geronimo, JBoss, Oracle> Converse is true also: Hibernate & OpenJPA run on GlassFish

    See Java Persistence API presentation today @ 4:10

    World Record Performance

    mailto:[email protected]:[email protected]
  • 8/14/2019 Td Mxc Javaee Chen

    49/71

    World Record PerformanceSPECjAppServer 2004

    SPECjAppServer Benchmark> July 2007: #1 score on T2000> 883.66 JOPS@Standard for GlassFish v2

    > 10% faster than BEA WebLogic

    > 30% faster than IBM WebSphere 6.1

    > July 2007: Best $/perf. on full Open Source stack> 813.73 JOPS@Standard

    > GlassFish v2, OpenSolaris, Java 6, PostgreSQL

    > 3x the price/perf vs. Oracle on HP score

    Performance: Startup Speed> Start as little as possible in v2 (see also v3)

    You no longer need to chose between Open Source and performance

    Sun BEA IBM JBoss

    0

    100

    200

    300

    400

    500

    600

    700

    800

    900

    SPECjAppServer 2004 Results

    ?

    Performance

  • 8/14/2019 Td Mxc Javaee Chen

    50/71

    Performance

    60% faster than GlassFish V1/SJSAS 9.0!

    SJSAS8.2

    GFv1/9.0 GFv2/9.10

    50

    100

    150

    200

    Overall Performance

    Agenda

  • 8/14/2019 Td Mxc Javaee Chen

    51/71

    51

    g

    > Java EE 5 Overview> Project GlassFish

    > What is GlassFish?> GlassFish v2 Main Feature and

    Technology> Future Direction> Call to Action, Summary and

    Resources

    51

    J EE 6 JSR 316

  • 8/14/2019 Td Mxc Javaee Chen

    52/71

    Java EE 6 JSR 316

    Extensibility> Embrace and support popular frameworks and technologies

    developed in external communities> Layer these technologies cleanly on top of Java EE platform

    Profiles> Rules for referencing Java EE platform technologies in Java EE

    Profiles> A profile may include a subset of Java EE platform technologies,

    additional JCP technologies, or both Pruning

    > Define process of removing technologies from platform

    Goal is to deliver a final version by the end of 2008

  • 8/14/2019 Td Mxc Javaee Chen

    53/71

    GlassFish v3

  • 8/14/2019 Td Mxc Javaee Chen

    54/71

    Small, Fast, Modular

    > Less than 1.0 sec startup Totally Modular, kernel is Based on a module sub-system: HK2 (Hundred K Kernel)> Can run in a phone, in a desktop application or in-process

    An ideal Container for Web 2.0> Java and Scripting applications> Support for upcoming Java EE 6 profiles

    A container that can do Java EE and more

    > Don't think of it as a Java EE 5 container> A good fit for SOA/ESB solutions

    Decomposition of the Java Platform, Enterprise Edition(Java EE platform) application server implementation

    GlassFish v3 Work in Progress

  • 8/14/2019 Td Mxc Javaee Chen

    55/71

    GlassFish v3 Work in Progress

    Sample Containers> Java Web Container> JRuby (no GoldSpike required)> PHP (via Quercus)

    > JavaScript (via Phobos)> Whatever you decide!

    Code and documentation available today

    Plans & Roadmap> Java Web profile likely in 1H2008

    New Areas GlassFish v3

  • 8/14/2019 Td Mxc Javaee Chen

    56/71

    New Areas - GlassFish v3

    Modular, OSGi-based Lightweight, Fast StartUp, Scalable

    Embeddable and Extensible

    JavaEE 6 and Frameworks All JVM-Scripting Languages

    For Developers and Deployers, Education and Research

    New Partnering Opportunities From Very small to HA to Communication to Grid

    GlassFish v3

  • 8/14/2019 Td Mxc Javaee Chen

    57/71

    GlassFish v3

    GlassFish, an Open Source application server built onand with Open Source components :> Maven 2

    > build system

    > module description> Felix

    > OSGi module management

    > Eclipse Link> Java Persistence Architecture implementation

    V3 is the third open source release of GlassFish

    GlassFish V3 modularity

  • 8/14/2019 Td Mxc Javaee Chen

    58/71

    GlassFish V3 modularity

    Based on a module management runtime> last year : HK2 homegrown module management> today we add : OSGi Felix as the underlying module

    management runtime. Modules are great but let's face it, they do nothing just

    being modules !

    V3 innovation :> allow any type of container to be plugged in.> start all containers and services on demand yielding an

    unmatched startup time for a Java EE server.> focus on developer (keeping the already numerous

    deployer's features)

    Services

  • 8/14/2019 Td Mxc Javaee Chen

    59/71

    Services

    GlassFish V3 use extensively Services to identifyextension points like :> Application Containers (like Web-App, Phobos, Jruby...)

    > Administrative Commands

    Services are :> implementing an interface

    > Java SE style with a META-INF/services file

    > OSGi style

    > HK2

    Can be stateless or statefull

    GlassFish V3 Runtime

  • 8/14/2019 Td Mxc Javaee Chen

    60/71

    GlassFish V3 Runtime

    GlassFish V3 modules(OSGi + extra metadata)

    HK2 Service layerOSGi

    Service Layer

    OSGi Bundle management

    Random OSGi Bundle

    ServiceMapper

  • 8/14/2019 Td Mxc Javaee Chen

    61/71

    R ti

  • 8/14/2019 Td Mxc Javaee Chen

    62/71

    requests

    Runtime

    Grizzly

    OSGi Runtime

    HK2 Services

    GlassFish Kernel

    Bundles repositories

    JRuby/Rails

    Web

    Security

    Naming

    Config

    Injection

    browser

    dispatch

    services

    GlassFish V3 containers

  • 8/14/2019 Td Mxc Javaee Chen

    63/71

    GlassFish V3 containers

    Basic Functionalities> handles certain application types> started and stopped on demand

    Optional features> Configuration services (so all containers configuration can be

    centrally managed)> administration commands> administration console plugins

    Container pluggability

  • 8/14/2019 Td Mxc Javaee Chen

    64/71

    Container pluggability

    Kernel

    ContainerRuntime

    C

    onfig Admin commands

    GUI Parts

    Admin ConsoleCentral Config

    client/browser

    domain.xml

    console user

    admin invocation

    Grizzly Adapter

    The SailFin Project

  • 8/14/2019 Td Mxc Javaee Chen

    65/71

    The SailFin Project

    Ericsson SIP ServletContribution is available at:> http://sailfin.dev.java.net

    Visit, Download, Try, Join

    > Milestone 1 available Not just for telco operators!

    > Bridging the HTTP and SIPprotocols

    Built on GlassFish v2and expected first half of2008

    JAX-RS & Jersey

    http://sailfin.dev.java.net/http://sailfin.dev.java.net/
  • 8/14/2019 Td Mxc Javaee Chen

    66/71

    http://jsr311.dev.java.net

    POJO-based RESTful Web Services> JSR 311, and also part of Java EE 6 (JSR 316)> High-level declarative programming model> Flexible typing, runtime takes care of common conversions

    > Pluggable support for types, containers, and resolvers Reference Implementation

    > http://jersey.dev.java.net(also from GlassFish via update center)> Flexible JSON / XML MIME types based on JAXBObjects

    > Deployment options: JAX-WS endpoint (per JSR), Grizzly, Java 6lightweight HTTPd

    Roadmap> JSR and Reference Implementation final by 2H2008

    Agenda

    http://jersey.dev.java.net/http://jersey.dev.java.net/
  • 8/14/2019 Td Mxc Javaee Chen

    67/71

    67

    > Java EE 5 Overview> Project GlassFish> What is GlassFish?> GlassFish v2 Main Feature and

    Technology

    > Future Direction> Call to Action, Summary and

    Resources

    67

    We Need Your Participation!

  • 8/14/2019 Td Mxc Javaee Chen

    68/71

    We Need Your Participation!

    As Users> What's Working? What is Missing?

    As Contributors> Bug Reports

    > Documents, Localization> Evangelism! Talk to your friends

    > Contribute Bug Fixes and Code!

    Top Priority!> Review GF V2 Details now!

    > Use GF V2

    > Try GF V3 preview

    Summary

  • 8/14/2019 Td Mxc Javaee Chen

    69/71

    Java EE 5 is a BIG improvement!> GlassFish is the best Java EE 5 App Server

    > And we want to make it the best for you

    Help Us!

    > Spread the word on Java EE 5 and GlassFish> Improve GlassFish Review and Use GF V2

    > Try GlassFish v3 preview

    Stay in Touch!> Join SDN - developer.sun.com

    Resources

  • 8/14/2019 Td Mxc Javaee Chen

    70/71

    http://glassfish.java.net

    http://wiki.glassfish.java.net

    http://blogs.sun.com/theaquarium

    http://glassfish.java.net/http://wiki.glassfish.java.net/http://blogs.sun.com/theaquariumhttp://blogs.sun.com/theaquariumhttp://wiki.glassfish.java.net/http://glassfish.java.net/
  • 8/14/2019 Td Mxc Javaee Chen

    71/71

    71

    Java EE, GlassFishand their future

    Doris Chen Ph.D.

    Principal Engineer/Technology EvangelistSun Microsystems, Inc.

    71