Docstoc

Slide 1 - Portland Java User Group.ppt

Document Sample
Slide 1 - Portland Java User Group.ppt Powered By Docstoc
					What’s new in J2EE 1.4


    Sean C. Sullivan
    Portland Java Users Group
    February 2004
   Evolution of the J2EE platform



    Servlets 2.1     J2EE 1.2                         J2EE 1.4
    November 1998    December 1999                    November 2003



       1998         1999    2000     2001      2002   2003


EJB 1.0        JSP 1.0               J2EE 1.3
March 1998     September 1999        September 2001
   Evolution of the J2EE platform



    Servlets 2.1     J2EE 1.2                         J2EE 1.4
    November 1998    December 1999                    November 2003



       1998         1999    2000     2001      2002   2003


EJB 1.0        JSP 1.0               J2EE 1.3
March 1998     September 1999        September 2001
Agenda

• J2EE 1.4
• J2EE 1.4 SDK
• Adventure Builder
J2EE Application Server

  Client       J2EE Server

 Browser
              Servlet   JSP

               Web container
Application                    Database
  Client


               EJB      EJB
Application
  Client
Container      EJB container
J2EE 1.4 specification




                         246 pages
J2EE 1.4 technologies

• Servlets 2.4            •   JCA 1.5
•   JSP 2.0               •   JAXR 1.0
•   EJB 2.1               •   JAX-RPC 1.1
•   JMS 1.1               •   SAAJ 1.2
                          •   JACC 1.0
•   JTA 1.0.1B
                          •   JavaMail 1.2
•   JTS 1.0
•   JMX 1.2
•   J2EE Management API 1.0
•   J2EE Deployment API 1.1
J2EE 1.4 and Web Services



 “The Java 2 Platform, Enterprise Edition
   version 1.4 is the most complete Web
   services platform ever.”




 source: http://java.sun.com/j2ee/1.4/download-dr.html
Support for web services

• SOAP
• SOAP with Attachments
• WSDL
• UDDI
• SOAP transport
  – HTTP
  – HTTPS
• WS-I Basic Profile 1.0
Web service example




Web services          Stock quote
   client             web service
Web service example



               “SUNW”

Web services            Stock quote
   client               web service
Web service example



               “SUNW”

Web services            Stock quote
   client       5.24    web service
Web Services for J2EE (JSR-921)




                    98 pages
JSR-921

• Client programming model
• Server programming model
  – Web service endpoints
  – Service implementation beans
• Defines deployment requirements for J2EE
  web services
Web Service API’s

• SAAJ 1.2
• JAX-RPC 1.1
• JAXR 1.0
SAAJ 1.2 specification




                         125 pages
SAAJ 1.2

• a low-level API for producing and
  consuming SOAP 1.1 messages
• package: javax.xml.soap
javax.xml.soap

• SOAPMessage          •   SOAPPart
• SOAPMessageFactory   •   AttachmentPart
• SOAPEnvelope         •   SOAPElement
• SOAPHeader           •   SOAPElementFactory
• SOAPHeaderElement    •   SOAPConnection
• SOAPBody             •   SOAPConnectionFactory
                       •   SOAPException
• SOAPBodyElement
JAX-RPC 1.1 specification




                     167 pages
JAX-RPC 1.1

• an API for building
  – web services
  – web service clients
• JAX-RPC is dependent upon SAAJ




                          # - Remote Procedure Call
JAX-RPC packages

• javax.xml.rpc
• javax.xml.rpc.encoding
• javax.xml.rpc.handler
• javax.xml.rpc.handler.soap
• javax.xml.rpc.server
• javax.xml.rpc.soap
SAAJ versus JAX-RPC



“Most developers will not use the SAAJ API,
  but will use the higher-level JAX-RPC API
  instead.” (Sun, J2EE 1.4 Tutorial)
JAXR 1.0 specification




                 119 pages
JAXR 1.0

• standard API for accessing XML registries
• supports UDDI and ebXML registries
JAXR packages

javax.xml.registry
  • Connection
  • RegistryService
    …
javax.xml.registry.infomodel
  • RegistryObject
  • Service
  • ServiceBinding
    …
Servlet 2.4 specification




                        330 pages
What’s new in Servlet 2.4?

• javax.servlet.ServletRequestListener
• javax.servlet.ServletRequestEvent
• javax.servlet.ServletRequestAttributeListener
• javax.servlet.ServletRequestAttributeEvent
What’s new in Servlet 2.4?

• improved servlet filter mapping
  –   REQUEST
  –   FORWARD
  –   INCLUDE
  –   ERROR
• SingleThreadModel is deprecated
JSP 2.0 specification



                    JSP 1.0 -- 112 pages
                    JSP 1.1 -- 158 pages
                    JSP 1.2 -- 268 pages
                    JSP 2.0 -- 478 pages
JSP 2.0

•   javax.servlet.jsp.ErrorData
•   javax.servlet.jsp.JspContext
•   javax.servlet.jsp.el.FunctionMapper
•   javax.servlet.jsp.el.VariableResolver
•   javax.servlet.jsp.el.Expression
•   javax.servlet.jsp.el.ExpressionEvaluator
•   javax.servlet.jsp.tagext.DynamicAttributes
•   javax.servlet.jsp.tagext.JspTag
•   javax.servlet.jsp.tagext.SimpleTag
•   javax.servlet.jsp.tagext.SimpleTagSupport
•   javax.servlet.jsp.tagext.TagAdapter
•   javax.servlet.jsp.tagext.FunctionInfo
•   javax.servlet.jsp.tagext.JspFragment
JSP Expression Language

Example



<input name=city
  value=“${location.city}”>
<input name=state
  value=“${location.state}”>
<input name=zip value=${location.zip}”>
EJB 2.1 specification




                        646 pages
What’s new in EJB 2.1?

• support for web services
• EJB Timer service
• more generalized architecture for message
  driven beans
• EJB QL enhancements
• new deployment descriptor elements
EJB Timer Service

• enables you to schedule timed notifications
• single event timers
• interval timers
EJB Timer Service API

• javax.ejb.EJBContext
  – method: getTimerService
• javax.ejb.TimerService
• javax.ejb.TimedObject
• javax.ejb.Timer
• javax.ejb.TimerHandle
JMS 1.1 specification




                        140 pages
What’s new in JMS 1.1?




 JMS 1.1 gives you the ability to use
 queues and topics in the same transaction
JMS API

Common              Point-to-point           Pub/sub
interfaces
ConnectionFactory   QueueConnectionFactory   TopicConnectionFactory

Connection          QueueConnection          TopicConnection

Destination         Queue                    Topic

Session             QueueSession             TopicSession

MessageProducer     QueueSender              TopicPublisher

MessageConsumer     QueueReceiver,           TopicSubscriber
                    QueueBrowser
JCA 1.5




          490 pages
JCA system contracts

• Connection management (JCA 1.0)
• Security management (JCA 1.0)
• Transaction management (JCA 1.0)
• Lifecycle management (JCA 1.5)
• Work management (JCA 1.5)
• Transaction inflow (JCA 1.5)
• Message inflow (JCA 1.5)
J2EE Management API 1.0




                 214 pages
J2EE Management API

• defines the J2EE Management Model
• management events
  – event notification
• state management
  – start, startRecursive, stop
• performance monitoring
  – runtime statistics
J2EE Management events

• j2ee.object.created
• j2ee.object.deleted
• j2ee.state.starting
• j2ee.state.running
• j2ee.state.stopping
• j2ee.state.stopped
• j2ee.state.failed
• j2ee.attribute.changed
J2EE Management packages

• javax.management.j2ee
• javax.management.j2ee.statistics
J2EE Deployment API 1.0




                  96 pages
J2EE Deployment packages

• javax.enterprise.deploy.model
• javax.enterprise.deploy.shared
• javax.enterprise.deploy.shared.factories
• javax.enterprise.deploy.spi
• javax.enterprise.deploy.spi.exceptions
• javax.enterprise.deploy.spi.factories
• javax.enterprise.deploy.spi.status
Deployment descriptors

• J2EE 1.2 and J2EE 1.3:
  – defined by DTD’s
• J2EE 1.4:
  – defined by XML Schema (XSD)
DTD’s and Schemas

    J2EE 1.3                         J2EE 1.4
•   application-client_1_3.dtd   •   application-client_1_4.xsd
•   application_1_3.dtd          •   application_1_4.xsd
                                 •   connector_1_5.xsd
•   connector_1_0.dtd
                                 •   ejb-jar_2_1.xsd
•   ejb-jar_2_0.dtd              •   j2ee_1_4.xsd
•   web-app_2_3.dtd              •   j2ee_jaxrpc_mapping_1_1.xsd
•   web-jsptaglibrary_1_2.dtd    •   j2ee_web_services_1_1.xsd
                                 •   j2ee_web_services_client_1_1.xsd
                                 •   jsp_2_0.xsd
                                 •   web-app_2_4.xsd
                                 •   web-jsptaglibrary_2_0.xsd
                                 •   xml.xsd
web.xml - J2EE 1.3

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web
   Application 2.3//EN' 'http://java.sun.com/dtd/web-
   app_2_3.dtd'>
<web-app>
  <display-name>helloworld</display-name>
  <servlet>
    <servlet-name>HelloServlet</servlet-name>
    <servlet-class>org.pjug.HelloServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>HelloServlet</servlet-name>
    <url-pattern>/hello/*</url-pattern>
  </servlet-mapping>
</web-app>
web.xml - J2EE 1.4

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
   xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <display-name>helloworld</display-name>
  <servlet>
    <servlet-name>HelloServlet</servlet-name>
    <servlet-class>org.pjug.HelloServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>HelloServlet</servlet-name>
    <url-pattern>/hello/*</url-pattern>
  </servlet-mapping>
</web-app>
Review: J2EE 1.4 technologies

• Servlets 2.4            •   JCA 1.5
•   JSP 2.0               •   JAXR 1.0
•   EJB 2.1               •   JAX-RPC 1.1
•   JMS 1.1               •   SAAJ 1.2
                          •   JACC 1.0
•   JTA 1.0.1B
                          •   JavaMail 1.2
•   JTS 1.0
•   JMX 1.2
•   J2EE Management API 1.0
•   J2EE Deployment API 1.1
 Not part of J2EE 1.4

• JSTL                • JMX Remote API
• JavaServer Faces      (JSR-160)
                      • STAX (JSR-173)
• JDBC RowSets
  (JSR-114)           • JCACHE (JSR-107)
• JAXB                • Portlets (JSR-168)
• Java Data Objects   • JWSDL (JSR-110)
• JNLP
J2EE 1.4 SDK

• J2EE 1.4 Application Server
• Schema files
  – <J2EE_HOME>/lib/schemas
• Command line tools
• Sample applications
App server admin console
SDK command line tools

•   appclient
•   asadmin
•   asant
•   capture-schema
•   deploytool
•   jspc
•   package-appclient
•   verifier
•   wscompile
•   wsdeploy
Adventure Builder demo
Open source projects

Tomcat 5.0
  – http://jakarta.apache.org/tomcat
Apache Axis
  – http://ws.apache.org/axis/
Apache Geronimo
  – http://incubator.apache.org/
ObjectWeb
  – http://www.objectweb.org/
For more information

• http://java.sun.com/j2ee/
• http://java.sun.com/webservices/
• http://java.sun.com/blueprints/enterprise/
• http://www.jcp.org/
Backup slides

These additional slides are backup material.
JACC 1.0

• javax.security.jacc.PolicyConfiguration
•   javax.security.jacc.PolicyContextHandler
•   javax.security.jacc.EJBMethodPermission
•   javax.security.jacc.EJBRoleRefPermission
•   javax.security.jacc.PolicyConfigurationFactory
•   javax.security.jacc.PolicyContext
•   javax.security.jacc.WebResourcePermission
•   javax.security.jacc.WebRoleRefPermission
•   javax.security.jacc.WebUserDataPermission
Not covered in this presentation

• JMX 1.2
• JTA
• JTS
• JavaMail

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:23
posted:9/3/2011
language:English
pages:61
yanyan yan yanyan yan
About