Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
® IBM Software Group J2EE Container Services Overview © 2007 IBM Corporation 4.1.0.3 Unit objectives After completing this unit, you should be able to: Describe the container services provided by J2EE Discuss J2EE interoperability List the J2EE platform roles Discuss the J2EE implementation 2 J2EE Standard Services – Overview (1 of 2) J2EE provides standard services to facilitate interaction with different technologies This also insulates the developer from the actual implementation of the service Two services previously in J2EE now in J2SE in version 1.4: JDBC (relational database connectivity) JNDI (Java Naming and Directory Interface) 3 J2EE Standard Services – Overview (2 of 2) The standard services provided in J2EE include the following: Hypertext Transfer Protocol (HTTP) Remote Method Invocation/Internet Inter-ORB Protocol (RMI-IIOP) Java Interface Definition Language (Java IDL) Java Transaction API (JTA) Java Message Service (JMS) JavaMail JavaBeans Activation Framework (JAF) Java API for XML Parsing (JAXP) Web Services (including JAX-RPC and SAAJ) J2EE Connector Architecture (JCA) Java Authentication and Authorization Service (JAAS) Java Authorization Service Provider Contract for Containers (JACC) 4 J2SE Standard Services - JNDI Java Naming and Directory Interface Standard Extension JNDI provides directory and naming functionality The API is independent of the directory implementation JNDI enables applications to discover and retrieve objects of any type JNDI is used to register EJBs and to access server-provided objects 5 J2SE Standard Services - JDBC JDBC is an API that provides vendorindependent connectivity to a variety of relational databases JDBC functionality provides basic connectivity and core database-related classes The Standard Extension provides additional functionality The Java Naming and Directory Interface (JNDI) can be used to manage data sources and connections Connection pooling can be provided by database vendors to enhance performance, particularly for server applications Support for distributed transactions, including support for the standard two-phase commit protocol used by the Java Transaction API (JTA) 6 J2EE Standard Services - Communications Hypertext Transfer Protocol The HTTP client-side API is defined by the java.net package The server-side API is defined by the Servlet and JSP interfaces The client- and server-side APIs also support HTTP over secure sockets (HTTPS) RMI-IIOP Allows RMI-style programming independent of protocol Implementation supports both the RMI protocol (JRMP) and CORBA IIOP Java IDL Allows J2EE components to invoke external CORBA objects using IIOP, which may be written in any language 7 J2EE Standard Services - JTA Java Transaction API Standard Extension JTA specifies interfaces between a transaction manager and the parties involved in a distributed transaction system The application, the resource manager, and the application server JTA is implementation-neutral For application developers, the UserTransaction interface is the key Application developers normally want to use container-managed transaction demarcation, instead of using JTA 8 J2EE Standard Services - Messaging Java Messaging Service Standard Extension The Java Message Service is a standard, vendor-neutral API used to access enterprise message systems Analogous to JDBC for databases Allows for the delivery of asynchronous messages in an application The JMS client sending the message does not have to wait until the message has been processed JavaMail Standard Extension and JAF JavaMail is used to add e-mail capability to applications Includes classes which encapsulate common mail functions and protocols Uses the JavaBeans Activation Framework to encapsulate message data 9 J2EE Standard Services - JAXP Java API for XML Parsing (JAXP) JAXP enables applications to parse and transform XML documents Independent of XML processor implementation JAXP includes industry standard components DOM (Document Object Model) SAX (Simple API for XML Processing) XSLT (XML Style Language Transformations) JAXP adds additional functionality beyond these standards Java API for XML – Remote Procedure Call (JAX-RPC) Enables Java applications incorporating XML-based RPC functionality according to the SOAP (Simple Object Access Protocol) 1.1 specification Java API for XML Registries (JAX-R) APIs to access UDDI Registry 10 J2EE Standard Services - Web Services Web Services now part of J2EE 1.4 JAX-RPC 1.1 JAX-R Web Services for J2EE specification (JSR 109) Standard deployment model of Web Services application within a J2EE Application Server WS-I Basic Profile 1.0 Guidelines for interoperability in a heterogeneous environment SAAJ 1.1 – SOAP with attachments API for Java 11 J2EE Standard Services - Connectors J2EE Connector Architecture (JCA) Allows resource adapters that support access to Enterprise Information Systems (EIS) to be plugged into J2EE products Defines a connection management contract between a J2EE server and a resource adapter to allow connection pooling to EIS systems Defines a transaction management contract between the transaction manager and an EIS that supports transactional access Also supports transactions that are managed entirely by an EIS Defines a security contract that enables secure access to an EIS 12 J2EE Standard Services - JAAS Java Authentication and Authorization Service (JAAS) JAAS can be used for two purposes: Authentication of users, to reliably and securely determine who is currently executing Java code, regardless of how the code is running Authorization of users to ensure they have the permissions required to do the actions performed JAAS authentication is pluggable Java applications using JAAS remain independent from underlying authentication technologies JAAS authorization extends the existing Java security architecture Access control can be based not just on what code is running, but also on who is running it Java Authorization Service Provider Contract for Containers (JACC) Allows custom authorization service providers to be plugged into the Application Server 13 J2EE Interoperability The J2EE platform includes interoperability requirements J2EE may be used to integrate systems Applications written in different languages, like C++ or Visual Basic Applications running on different platforms, such as PCs or UNIX workstations Stand-alone Java-based applications that are not directly supported by J2EE The interoperability requirements of J2EE make this possible J2EE applications can connect to legacy systems using CORBA or low-level socket interfaces J2EE applications can connect to other J2EE applications across multiple J2EE products Interoperability is achieved through the use of standard protocols for communication and data transfer 14 J2EE Platform Roles J2EE defines the following roles J2EE product provider Implements a J2EE product that provides containers, APIs, and other features Application component provider Produces application building blocks (HTML documents, EJBs, JSPs, and so forth) In many cases this role will be further subdivided Application assembler Takes components developed by component providers and assembles them into complete a J2EE application Deployer Deploys, configures, and runs EJBs and Web applications System administrator Configures and administers the infrastructure Tool provider Provides application component development and packaging tools 15 J2EE Implementation The J2EE Compatibility Test Suite Includes over 15000 tests for J2EE 1.4 Tests a candidate platform for J2EE compatibility Checks that all the necessary operations (for example, in required APIs) are possible Checks that the behavior of the APIs meets the specification Checks end-to-end compatibility by performing operations on J2EE components and back-end systems and checking the results Ensures portability between platforms The J2EE Reference Implementation Provides an operational definition of the J2EE platform The purpose is to validate the specification and act as a reference for J2EE platform providers Can be used by developers to confirm portability Included as a binary with the J2EE Software Development Kit (free for development and testing) 16 Checkpoint 1. What do J2EE standard services offer? 17 Checkpoint solutions 1. A standardized way of accessing services that enterprise application require. 18 Unit summary Having completed this unit, you should be able to: Describe the container services provided by J2EE Discuss J2EE interoperability List the J2EE platform roles Discuss the J2EE implementation 19