Java EE, GlassFish and their future by msz78385

VIEWS: 43 PAGES: 62

									Java EE, GlassFish
and their future



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


                                           1
                                           1
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
                                    2
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, ...
Java EE 5.0 Summary
How is it easier?
J2EE 1.4                   Java EE
• Deployment               • Java language
  descriptors                annotations @
• Required container       • Plain Old Java Objects
  interfaces                 (POJOs)
• JNDI Lookups             • Dependency Injection
• Deployment descriptor,   • More and better
  interfaces                 defaults
• No Supported UI          • Java Server Faces
  Framework                  (JSF)
SpecificationChanges 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
    Using JAX-RPC 1.1                         <?xml version='1.0' encoding='UTF-8' ?>
                                              <webservices xmlns='http://java.sun.com/xml/ns/j2ee' version='1.1'>
                                               <webservice-description>
                                                <webservice-description-name>
                                                 HelloService</webservice-description-name>
package endpoint;                               <wsdl-file>
import java.rmi.*;                               WEB-INF/wsdl/HelloService.wsdl</wsdl-file>
                                                <jaxrpc-mapping-file>

public class HelloServiceImpl                    WEB-INF/HelloService-mapping.xml
                                                 </jaxrpc-mapping-file>
              implements HelloServiceSEI {      <port-component xmlns:wsdl-port_ns='urn:HelloService/wsdl'>
                                                 <port-component-name>HelloService</port-component-name>

     public String sayHello(String param)        <wsdl-port>wsdl-port_ns:HelloServiceSEIPort</wsdl-port>
                                                 <service-endpoint-interface>
          throws java.rmi.RemoteException {       endpoint.HelloServiceSEI</service-endpoint-interface>
          return “Hello “ + param;               <service-impl-bean>

     }                                             <servlet-link>WSServlet_HelloService</servlet-link>
                                                 </service-impl-bean>
}                                               </port-component>
                                               </webservice-description>

package endpoint;                             </webservices>
                                              <?xml version='1.0' encoding='UTF-8' ?>
import java.rmi.*;                            <configuration
                                                xmlns='http://java.sun.com/xml/ns/jax-rpc/ri/config'>

public interface HelloServiceSEI               <service name='HelloService'
                                                 targetNamespace='urn:HelloService/wsdl'
               extends java.rmi.Remote {         typeNamespace='urn:HelloService/types'
     public String sayHello(String param)        packageName='endpoint'>

          throws java.rmi.RemoteException;      <interface name='endpoint.HelloServiceSEI'
                                                   servantName='endpoint.HelloServiceImpl'>
}                                               </interface>
                                               </service>



                                                                 OLD! J2EE 1.4
                                              </configuration>
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
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
 EJB References in Java EE 5
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();
                                           OLD! J2EE 1.4
@EJB Converter currencyConverter;
                                          NEW! Java EE 5
JAXB 1.0 in J2EE 1.4
Generated Code...
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v@@BUILD_VERSION@@
//                            See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
//                            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 java.lang.Ob ject owner() {
public class PointTypeImpl implements generated.PointType, com.sun.xml.bind.JAXBObject, generated.impl.runtime.UnmarshallableObject, generated.impl.runtime.XMLSerializable, generated.impl.runtime.ValidatableObject                return generated.impl.PointTypeImpl.this;
{                                                                                                                                                                                                                                  }

    protected boolean has_Y;                                                                                                                                                                                                       public void enterElement(java.lang.Str ing ___uri, java.lang.Str ing ___local, java.lang.String _ __qname, org.xml.sax.Attributes __atts)
    protected float _Y;                                                                                                                                                                                                              throws org.xml. sax.SAXException
    protected boolean has_X;                                                                                                                                                                                                       {
                                                                                                                                                                                                                                     int attIdx;
    protected float _X;                                                                                                                                                                                                              outer:
    public final static java.lang.Class version = (generated.impl.JAXBVersion.class);                                                                                                                                                while (true) {
    private static com.sun.msv.grammar.Grammar schemaFragment;                                                                                                                                                                          switch (state) {
                                                                                                                                                                                                                                           case 3 :
    private final static java.lang.Class PRIMARY_INTERFACE_CLASS() {                                                                                                                                                                          if (("y" == ___local)&&("" == ___uri)) {
        return (generated.PointType.class);                                                                                                                                                                                                       contex t.pushAttributes(__atts, true);
    }                                                                                                                                                                                                                                             state = 4;
                                                                                                                                                                                                                                                  return ;
                                                                                                                                                                                                                                              }
    public float getY() {
                                                                                                                                                                                                                                              break;
        return _Y;                                                                                                                                                                                                                         case 0 :
    }                                                                                                                                                                                                                                         if (("x" == ___local)&&("" == ___uri)) {
                                                                                                                                                                                                                                                  contex t.pushAttributes(__atts, true);
    public void setY(float value) {                                                                                                                                                                                                               state = 1;
        _Y = value;                                                                                                                                                                                                                               return ;
        has_Y = true;                                                                                                                                                                                                                         }
    }                                                                                                                                                                                                                                         break;
                                                                                                                                                                                                                                           case 6 :
    public float getX() {                                                                                                                                                                                                                     revertToParentFromEn terElement(__ _uri, ___local, ___qname, __atts);
                                                                                                                                                                                                                                              return ;
        return _X;                                                                                                                                                                                                                      }
    }                                                                                                                                                                                                                                   super.enterElement(___uri, ___local, ___qname, __atts);
                                                                                                                                                                                                                                        break;
    public void setX(float value) {                                                                                                                                                                                                  }
        _X = value;                                                                                                                                                                                                                }
        has_X = true;
    }                                                                                                                                                                                                                              public void leaveElement(java.lang.String ___uri, java.lang.String ___local, java.lang.String ___qname )
                                                                                                                                                                                                                                     throws org.xml. sax.SAXException
    public generated.impl.runtime.UnmarshallingEventHandler createUnmarshaller(generated.impl.runtime.UnmarshallingContext context) {                                                                                              {
                                                                                                                                                                                                                                     int attIdx;
        return new generated.impl.PointTypeImpl.Unmarshaller(context);                                                                                                                                                               outer:
    }                                                                                                                                                                                                                                while (true) {
                                                                                                                                                                                                                                        switch (state) {
    public void serializeBody(generated.impl.runtime.XMLSerializer context)                                                                                                                                                                case 2 :
        throws org.xml.sax.SAXException                                                                                                                                                                                                       if (("x" == ___local)&&("" == ___uri)) {
    {                                                                                                                                                                                                                                             contex t.popAttributes();
        if (!has_Y) {                                                                                                                                                                                                                             state = 3;
            context.reportError(com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "Y"));                                                                                                                                            return ;
                                                                                                                                                                                                                                              }
        }
                                                                                                                                                                                                                                              break;
        if (!has_X) {                                                                                                                                                                                                                      case 6 :
            context.reportError(com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "X"));                                                                                                                                        revertToParentFromLeaveElement(___uri, ___local, ___qnam e);
        }                                                                                                                                                                                                                                     return ;
        context.startElement("", "x");                                                                                                                                                                                                     case 5 :
        context.endNamespaceDecls();                                                                                                                                                                                                          if (("y" == ___local)&&("" == ___uri)) {
        context.endAttributes();                                                                                                                                                                                                                  contex t.popAttributes();
        try {                                                                                                                                                                                                                                     state = 6;
            context.text(javax.xml.bind.DatatypeConverter.printFloat(((float) _X)), "X");                                                                                                                                                         return ;
        } catch (java.lang.Exception e) {                                                                                                                                                                                                     }
                                                                                                                                                                                                                                              break;
            generated.impl.runtime.Util.handlePrintConversionException(this, e, context);                                                                                                                                               }
        }                                                                                                                                                                                                                               super.leaveElemen t(___ur i, ___local, ___qname);
        context.endElement();                                                                                                                                                                                                           break;
        context.startElement("", "y");                                                                                                                                                                                               }
        context.endNamespaceDecls();                                                                                                                                                                                               }
        context.endAttributes();
        try {                                                                                                                                                                                                                      public void enterAttribute(java.lang.String ___uri, java.lang.String ___local, java.lang.String ___qname )
            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"));
        }




                                                                                                                                                                                                                        • 308 lines for
        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"




                                                                                                                                                                                                                          <point><x>1</x><y>2</y></point>
+"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/"




                                                                                                                                                                                                                        • 38 files
+"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!"




                                                                                                                                                                                                                        • 219KB of code in total
+"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;
        }




                                                                                                                                                                                                                                                                                                                                                                               OLD! J2EE 1.4
 JAXB 2.0 in Java EE 5
 Generated Code...
@XmlAccessorType(FIELD)                  • 62 lines for
@XmlType(name = "", propOrder = {"x","y"})
@XmlRootElement(name = "point")              <point>
public class Point {                           <x>1</x>
  protected float x;                           <y>2</y>
  protected float y;                         </point>
     public float getX() {               • 2 files
       return x;
     }                                   • 3KB of code in total
     public void setX(float value) {
       this.x = value;
     }

     public float getY() {
       return y;
     }
     public void setY(float value) {
       this.y = value;
}}
                                                   NEW! Java EE 5
How much easier is it?


   RosterApp1
                        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
   [1] Source: Raghu Kodali,
   Oracle
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
“Various Interface21ers, including Costin and Juergen, have
  taken a look at GlassFish and given it the thumbs up.”

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




[1]: blog.interface21.com, Feb. 2007
“... we were seriously stressed when IBM declared war with Geronimo
   and 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 about
   Sun's foray into the market. Oddly enough, of that group only Sun
   has managed to mount serious competition to JBoss.”

                             Marc Fleury, JBoss founder, August 2007 [2]


[2]: news.com, August 2007
“Among major vendors, Sun Microsystems Inc., has dramatically
  improved its standing in this year's evaluation of applications
  servers for service-oriented architecture (SOA) and business
  process management (BPM)”
                                  Forrester Research, August 2007 [3]


Sun and the GlassFish open-source community have delivered the
  first 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
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
 Timeline of Project GlassFish




Tomcat
Jasper
Catalina
 JSTL         GlassFish     v1            v2                  v3
 Struts                          v1 UR1           v2 UR1
    Crimson    Launch
     XSLTC
      Xalan
     Xerces

  JAXB          J1'05      J1'06          Sept.    Dec.    2008/2009
JAX-RPC                                            2007
              June 2005   May 2006        2007
   JSF
  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
(Some) Distributions& Contributors
                                       NetBeans 5.5, 6.0
                              Tools

          Java EE RI & SDK       NetBeans™               Communities
                                    IDE

   Distributions                               Eclipse Plugin

 Sun Java System                                        Derby
      AS 9.x
                                                   MQ
     JBoss 5                   Project
                              GlassFish
                                                   Portal Server
 TmaxSoft JEUS 6
   Oracle oc4j                               Open ESB            SailFin
                                                                Ericsson
   BEA WebLogic 10
                             Maven Rep
                                 Users and Other Groups
 Frameworks and Applications
                                       Quercus PHP
                  OSWorkFlow
                                       OSCache
                     Integration ORB             Project Tango
  Apache Httpd                CJUG-Classifieds
                                         BIRT        jBPM
   DOJO
 Facelets                    MyFaces
     Shale                   ADF SiteMesh        WebDAV
                         JSPwiki
                               SEAM
                                           Tapestry
                           MC4J
            StringBeans Portal          AJAX
         BlogTrader                   Wicket Equinox
Java WSDP
     Dalma                     WebSphere MQ    EHCache
Tools Support
                               • GlassFish (v1, v2, v3)
• NetBeans 5.5.1, 6.0            plugin for Eclipse 3.3
• Best integration with :        (Europa)
  >   full Java EE 5 support
  >   resource creation        • Genuitec's MyEclipse
  >   remote debug               offers greater integration
  >   incremental deployment     between IDE and
  >   profiling                  GlassFish
  >   wizards, etc...
• Additional features (SOA,    • CodeGear JBuilder 2007
  UML, jRubyOnRails, ...)      • IDEA Intellij 6.0, 7.0
GlassFish Adoption Stories
http://blogs.sun.com/stories
• PeerFlix
  > GlassFish v1 on Solaris 10 / x2100
  > MySQL, Kodo JDO
• 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 and
    across universities
  > NetBeans, the Lucene search engine,
    PostgreSQL database, Shale standalone tiles
• More (small and large)
  > Help us collect these
  > stories@sun.com
GlassFish around you
http://beta.glassfish.java.net:81/maps/
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, our
  customers to be successful
  (and Sun too in the process)
Agenda

> Java EE 5 Overview
> Project GlassFish
  > What is GlassFish?
  > GlassFish v2 Main Feature and
    Technology
> Future Direction
> Call to Action, Summary and
 Resources




                                    26
GlassFish v2
SJS ApplicationServer 9.1
• Metro Web Services Stack
  > Performance, Microsoft interoperability
• Clustering, Load-Balancing, HA                           bl e!
  > Advanced Management                         ai la
• JBI support (OpenESB 2.0)          A v
• 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
 Metro
 JAX-WS, WSIT,and JAXB implementations
 • Dynamic JAX-WS Runtimes
 • JAXB 2.0 fully support XML Schema
     > A lot of reuse of GlassFish's JAXB implementation
 • GlassFish JAX-WS 2.x
     > Simple annotated POJO model
     > WS Separation of Transport and Encoding
        > HTTP, JMS, SMTP, TCP/IP
        > MTOM, Fast Infoset (binary), Textual, Others
 • WSIT (Project Tango)
     > Microsoft Interoperability and Quality of Service
     > Same (old) JAX-WS programing model
See “Metro and REST” presentation today @ 3:10
JAX-WS RI vs Axis2
Clustering Architecture                                      Custom
                                                            Resources

                  HTTP(S)      JMS      RMI/IIOP            Resource
                                                            Adapters

                    Message routing/failover/load balancing
   Management




                                                                 Instances
                                                                 Clustered
                                                     AS
                  AS   AS     AS     AS
                                               AS AS
                   Node A      Node B              Node N
                                                                 Applications
                HA Application State Repository                   and Config



                                                     Databases
Clustering in GlassFish v2

                                                                       Node Agent
                                                         JMX API
                                        Domain
                                      Administration
                                         Server
                                         (DAS)
                                                                        Node 1
                      JMX
                      API               Applications
                                                                       Node Agent
   asadmin>                             Resources

                                       Configuration
                                                                        Node 2
                                                          JMX API
                                   Administration Node


                                                                    Java EE Server
                                                                    Instance
JMX = Java Management Extensions
Dynamic Clustering and In-Memory
Replication
• 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)
Memory Replication
Typical cluster topology         Example: Maximize
                                 Availability on 4 node
                                 cluster on 2 machines




                Instance 1   Instance 2




                Instance 3   Instance 4




                Machine 1    Machine 2
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 through jConsole and others
•   Per-service monitoring levels
•   Call Flow
•   Self Management
•   Resource consumption management
 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
See “SOA using OpenESB” presentation today @ 12:00
AJAX and Scripting Activities
• jMaki - http://ajax.dev.java.net
  > Encapsulates very easily AJAX widgets
• 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
 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

See “jMaki” presentation Today @ 6:10
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
Introduction to Grizzly
 What Is the Grizzly HTTP Framework?
• 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 the
  HTTP processing layer
• Grizzly integrates with the current Apache Tomcat HTTP
  Connector architecture (Coyote)
  > Coyote is currently used in Tomcat 3.x/4.x/5.x
• Grizzly replaces Apache Tomcat Coyote HTTP front-end
  and thread pool
  > Utilizes its high performant buffers and
    parsing classes
Web Tier: JSP/Servlet/Grizzly

                                      • Grizzly
                                        > Java-based
            Grizzly
                                        > NewIO
HTTP                    Servlet/JSP     > @GlassFish
             APR
Requests                Container     • APR
           Coyote                       > C-based
                                      • Coyote
                                        > Java-based
           Connectors     Container     > Traditional
                                          connector
Benchmark Results

                              3000                            Traditional I/O
                              2750                            C-Based Server
                              2500                            C-Based Server
                              2250                            Grizzly
 % of Traditional I/O Score




                              2000
                              1750
                              1500
                              1250
                              1000
                              750
                              500
                              250
                                0
                                     2 CPU   6 CPU   16 CPU
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
 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: persistence@glassfish.dev.java.net
 • 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                              SPECjAppServer 2004 Results
             2004
SPECjAppServer                                  900

                                                800



 • SPECjAppServer Benchmark                     700

                                                600


    > July 2007: #1 score on T2000              500

                                                400
                                                                              ?
       > 883.66 JOPS@Standard for GlassFish v2  300



       > 10% faster than BEA WebLogic
                                                200

                                                100

       > 30% faster than IBM WebSphere 6.1        0
                                                        Sun    BEA     IBM    JBoss


    > 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
Performance

• 60% faster than GlassFish V1/SJSAS 9.0!

     Overall Performance
  200
  150
  100
   50
    0
         SJS        GFv1/9.0    GFv2/9.1
         AS8.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




                                    46
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
   Java EE 6 – Proposed New JSRs*
   • JSF 2.0 (JSR 314)
   • JAX-RS (JSR 311)
       > RESTful web services
   • WebBeans 1.0 (JSR 299) – led by JBoss
   • Servlets 3.0 (JSR 315)
   • Enterprise Java Beans 3.1
       > Singletons, Asynchrony, Concurrency options, ...
       > JavaBeans Validation framework (JSR 303)?
   • Java Persistence API 2.0
       > Criteria API, hierarchies in embeddables
   • Java EE Connector 1.6
*The exact set of technologies to be included will be determined by the expert group
GlassFish v3
• Small, Fast, Modular
  > Less than 1.0 sec startup
• Totally Modular, kernel is <100K
  > 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
• 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
The SailFin Project
• Ericsson SIP Servlet
  Contribution is available at:
  > http://sailfin.dev.java.net
• Visit, Download, Try, Join
  > Milestone 1 available
• Not just for telco operators!
  > Bridging the HTTP and SIP
    protocols
• Built on GlassFish v2
  and expected first half of
  2008
FOSS Middleware Components
•   GlassFish – AppServer, JavaPersistence, Web Tier
•   OpenPortal – Container, WSRP, Portlet, Portlet Rep
•   OpenESB, OpenJBI – JBI, BPEL
•   OpenSSO – Access & Federation Manager
•   OpenDS – Directory Server
•   Jersey – JAX-RS for RESTful Web Services
•   Hudson – Continuous build software
•   Phobos, jMaki... – Web 2.0/AJAX
•   Open MQ – MessageQueue
•   WoodStock – JSF Components
•   Apache Derby – JavaDB
•   Social Software – Apache Roller, Slynkr
OpenDS
opends.dev.java.net
 • Next generation Directory Services
   > Designed to meet the needs of the Telco market
   > High-Performance, highly extensible and VERY large
     deployments
 • Brand-new Code Base
   > Java-based, Very High Performance Goals
   > Not Based on DSEE (2B-entry deployments, market leader)
 • Full Fledged
   > Full LDAPv3, replicas
   > Virtual Directory, Proxies, Caching, etc...
 • Schedule
   > v1.0 before year's end
OpenESB
open-esb.dev.java.net
 • Based on JBI (Java Business Integration) Standard
 • Already Released
   > JBI Implementation
   > BPEL
   > Many binding components
 • More Components to be Released
 • Integrated within GlassFish V2
 • Distributed in
   > NetBeans 6.0 SOA/BPEL features
   > Future of Sun Composite Application Platform Suite (CAPS)
OpenSSO
opensso.dev.java.net
 • Access Manager, Single Sign-On, Federation
   > SAML, XACML, Liberty Standards
 • Already Released
   > Access Manager
   > Many Policy Agents
   > Federation Manager
 • To be Released
   > More Policy Agents
 • Distributed in
   > Sun Java System Access Manager & Federation Manager
OpenPortal
portal.dev.java.net
• Enterprise-class Portal Server
  > Basis for the commercial product from Sun
  > Next release is Sun Java System Portal Server 7.2
• Sub-projects
  > portlet-container.dev.java.net (JSR168 / JSR 286)
  > portlet-repository.dev.java.net
  > wsrp.dev.java.net (WSRP 1.0, 2.0)
  > portalpack.netbeans.org / eclipse-portalpack.dev.java.net
  > saw.dev.java.net (Worflow/SOA)
  > mirage.dev.java.net (CMS)
  > jsfportletbridge.dev.java.net
• Get more information from http://blogs.sun.com/portal
JAX-RS & Jersey
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 6
      lightweight HTTPd
• Roadmap
  > JSR and Reference Implementation final by 2H2008
Agenda

> Java EE 5 Overview
> Project GlassFish
  > What is GlassFish?
  > GlassFish v2 Main Feature and
    Technology
> Future Direction
> Call to Action, Summary and
 Resources




                                    58
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
 • 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

 • http://glassfish.java.net
 • http://wiki.glassfish.java.net
 • http://blogs.sun.com/theaquarium
Java EE, GlassFish
and their future



Doris Chen Ph.D.
doris.chen@sun.com
Principal Engineer/Technology Evangelist
Sun Microsystems, Inc.

                                           62

								
To top