Td Mxc Javaee Chen

  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Td Mxc Javaee Chen as PDF for free.

More details

  • Words: 4,120
  • Pages: 71
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, ...

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 ●

Using JAX-RPC 1.1

<webservices xmlns='http://java.sun.com/xml/ns/j2ee' version='1.1'> <webservice-description> <webservice-description-name>

package endpoint; import java.rmi.*;

HelloService <wsdl-file> WEB-INF/wsdl/HelloService.wsdl <jaxrpc-mapping-file>

public class HelloServiceImpl implements HelloServiceSEI {

WEB-INF/HelloService-mapping.xml <port-component xmlns:wsdl-port_ns='urn:HelloService/wsdl'> <port-component-name>HelloService

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

<wsdl-port>wsdl-port_ns:HelloServiceSEIPort <service-endpoint-interface> endpoint.HelloServiceSEI <service-impl-bean> <servlet-link>WSServlet_HelloService

package endpoint; import java.rmi.*;



public interface HelloServiceSEI extends java.rmi.Remote { public String sayHello(String param) throws java.rmi.RemoteException; }

<service name='HelloService' targetNamespace='urn:HelloService/wsdl' typeNamespace='urn:HelloService/types' packageName='endpoint'>


OLD! J2EE 1.4

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 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 java.lang.Ob ject owner() { return generated.impl.PointTypeImpl.this; }

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

public void enterElement(java.lang.Str ing ___uri, java.lang .String _ __local, java.lang .String _ __qname, org.xml.sax.Attributes __atts) throws org.xml. sax.SAXException { int attIdx; outer: while (true) { switch (state) { case 3 : if (("y" == ___local)&&("" == ___uri)) { contex t.pushAttributes(__atts, true); state = 4; return ; } break; case 0 : if (("x" == ___local)&&("" == ___uri)) { contex t.pushAttributes(__atts, true); state = 1; return ; } break; case 6 : revertToParentFromEn terElement(__ _uri, ___local, ___qname, __atts); return ; } super.enterElement(___uri, ___local, ___qname, __atts); break; } }

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 void leaveElement(java.lang.String ___uri, java.lang.String ___local, java.lang.String ___qname ) throws org.xml. sax.SAXException { int attIdx; outer: while (true) { switch (state) { case 2 : if (("x" == ___local)&&("" == ___uri)) { contex t.popAttributes(); state = 3; return ; } break; case 6 : revertToParentFromLeaveElement(___uri, ___local, ___qnam e); return ; case 5 : if (("y" == ___local)&&("" == ___uri)) { contex t.popAttributes(); state = 6; return ; } break; } super.leaveElemen t(___ur i, ___local, ___qname); break; } }

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 enterAttribute(java.lang.String ___uri, java.lang.String ___local, java.lang.String ___qname ) } } }

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; }

• 308 lines for

<point><x>12

• 38 files • 219KB of code in total

OLD! J2EE 1.4

JAXB 2.0 in Java EE 5 Generated Code...

• 62 lines for

@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; }}

<point> <x>1 2

• 2 files • 3KB of code in total

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

Java EE 5.0 Summary How is it easier?

J2EE 1.4 • Deployment descriptors • Required container interfaces • 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)

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 ProjectGlassFish

Tomcat Jasper Catalina JSTL Struts Crimson XSLTC Xalan Xerces

GlassFish Launch

JAXB JAX-RPC JSF

J1'05 June 2005

v1

v2 v1 UR1

J1'06 May 2006

v2 UR1

Sept. Dec. 2007 2007

v3 TP2 v2 UR2

May. 2008

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

GlassFish Today GlassFish Server

Hudson

Jersey

Woodstock jMaki

OpenMQ

OpenESB Shoal Phobos Slynkr Other SocialSoftware

WebTier JSF/Mojarra JSP

Metro JAXB

Grizzly HK2 AS Core EJB Others

Woodstox @Codehaus EclipseLink @Eclipse Derby @Java.Net Felix @ASF

(Some) Distributions & Contributors Tools Java EE RI & SDK

NetBeans 5.5, 6.0

Communities

NetBeans™ IDE

Eclipse Plugin

Distributions Sun Java System AS 9.x JBoss 5

Derby

Project GlassFish

TmaxSoft JEUS 6 Oracle oc4j BEA WebLogic 10

MQ Portal Server Open ESB

SailFin Ericsson

Maven Rep

Users and Other Groups

Productivity – From Your Perspective OSWorkFlow

Apache Httpd Open ESB

DOJO Facelets Shale

OSCache

Integration ORB

CJUG-Classifieds BIRT Seams OpenSSO MyFaces ADF SiteMeshWebDAV

JSPwiki

AJAX

Dalma StringBeans Portal BlogTrader WebSphere MQ

Tapestry

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 MyEclipse offers greater integration between IDE and GlassFish • CodeGear JBuilder 2007 • IDEA Intellij 6.0, 7.0

Helping You Grow

GlassFish Adoption Stories http://blogs.sun.com/stories

• iTAC Software Manufacturing Execution Systems (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 and

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

Some Adoption Indicators • +2.5M hits in 13 mo • +310K different IPs

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

GlassFish RoadMap v1 fcs v1 UR1 6/05

5/06

Sustaining train v2 fcs 9/07

v2.1 Fall/07

v2 UR1 v2 UR2 12/07

5/07 6/08

7/08

9/08

Sailfin beta

etc...

Sailfin fcs

v3 TP2 Metro Jersey Grizzly JSF/Mojarra

v3 fcs Java EE 6 fcs 4/09

1.2 1.1.2 1.3 5/08

6/08

Sustaining train

7/08

0.8

1.0

6/08

9/08

1.8.0

2.0

5/08

12/08

2.0 9/08

Production Ready ● ● ● ● ● ● ● ● ●

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 Disclaimers: SPEC and the benchmark name SPECjAppServer 2004 are registered trademarks of the Standard Performance Evaluation Corporation. Competitive benchmark results 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, 8 cores/chip, 8 threads/core) 1.4GHz 8,439.36 SPECjAppServer2004 JOPS@Standard. For the latest SPECjAppServer 2004 benchmark results, visit http://www.spec.org/.

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

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

31

GlassFish v2

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

! e l ilab

Ava

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 HTTP(S)

Custom Resources

RMI/IIOP

JMS

Resource Adapters

AS

AS

Node A

AS

AS

Node B

AS AS AS

Clustered Instances

Management

Message routing/failover/load balancing

Node N Applications and Config

HA Application State Repository Databases

Clustering in GlassFish v2 JMX API

JMX API asadmin>

Domain Administration Server (DAS)

Node Agent

Node 1

Applications

Node Agent

Resources Configuration

JMX API

Node 2

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

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

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

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 Grizzly HTTP Requests

APR

Servlet/JSP Container

> Java-based > NewIO > @GlassFish

• APR > C-based

Coyote

• Coyote Connectors

Container

> Java-based > Traditional

connector

Benchmark Results 3000

Traditional I/O C-Based Server C-Based Server Grizzly

2750 % of Traditional I/O Score

2500 2250 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: [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 SPECjAppServer 2004

SPECjAppServer 2004 Results

900 800

• SPECjAppServer Benchmark

700 600

> 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

?

500 400 300 200 100

0

Sun

BEA

IBM

JBoss

• 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 AS8.2

GFv1/9.0

GFv2/9.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

51

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

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 • GlassFish, an Open Source application server built on and 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 • 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 • GlassFish V3 use extensively Services to identify extension 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 GlassFish V3 modules (OSGi + extra metadata)

HK2 Service layer

Random OSGi Bundle

Service Mapper

OSGi Bundle management

OSGi Service Layer

GlassFish V3 Runtime • Kernel > startup/shutdown sequences > basic services (deployment) > configuration reading

• Services > Cross containers functionalities > Security, Naming Manager... > Admin Console

• Containers > handle user's applications > independent of each others

Runtime JRuby/Rails Web

Security

Config

Naming

Injection

dispatch GlassFish Kernel browser

Grizzly Bundles repositories

HK2 Services OSGi Runtime

requests services

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 console user domain.xml

Central Config

Container Runtime Grizzly Adapter

C o n f i g

Admin Console

GUI Parts

Admin commands

Kernel client/browser

admin invocation

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

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

67

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. Principal Engineer/Technology Evangelist Sun Microsystems, Inc.

71

Related Documents

Td Mxc Javaee Chen
October 2019 65
Td Mxc Jmaki Chen
October 2019 39
Td Mxc Rubyrails Shin
October 2019 38
Td Mxc Python Wierzbiki
October 2019 35
Td Mxc Soa Reddy
October 2019 34
Td Mxc D2keynote Thompson
October 2019 25