EAI
J2EE-Based Application Servers, Web Services and EAI
Digg This!
Today, Web services are being portrayed as the building blocks for the EAI platform, whereas, in the last three-to-four years, J2EE-based application
servers have been able to carve their way to the core of enterprise application integration (EAI) solutions for several small, mid-, and large-size companies. This article examines how J2EE-based application servers support Web services
and how they tie into and enterprise's overall integration and Web services strategy, enabling companies to use service-oriented architecture for EAI.
The myth...
Service-oriented architecture-based Web services is a "total and complete" EAI solution by itself-i.e., a solution for all integration needs.
The fact...
Web services is not EAI in and of itself. Rather, Web services is just another technology that enables EAI, and it can significantly change the traditional point-to-point integration approach.
Enterprise Application Integration Platform
Enterprise application integration is the process of creating an integrated infrastructure for linking disparate systems, custom and packaged applications, and data sources across the corporate enterprise. As shown in Figure 1, the EAI platform enables this process.
This platform provides a full duplex, bidirectional solution to seamlessly share and exchange data between ERP, CRM, and SCM; databases; data warehouses; legacy systems; and other important internal systems within a company.
J2EE Platform
The Java 2 Enterprise Edition (J2EE) platform provides a complete framework for the design, development, assembly, and deployment of Java applications built on multitiered distributed application models. These applications can reuse components, where a component is defined as a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and communicates with other components.
The J2EE platform has become a proven EAI platform because it provides features such as reliability, scalability, flexibility, platform support, code portability and reuse across tiers, transaction management, security, clustering, load-balancing and fail-over capabilities, performance, availability, connectivity, and Enterprise JavaBeans (EJB) strength.
What Do J2EE-based Application Servers Offer?
J2EE-based application servers are built on the J2EE-standard specifications for services and capabilities. They are component-based products and services that reside in the middle-tier of a server-centric architecture and provide middleware services for session and state management, unified security, database connectivity, and persistence (see Figure 2):
- Java servlets
- JavaServer Pages
- Enterprise JavaBeans
- Portable application development platform
- Scalable application development platform
- Extensible Markup Language (XML) Support
- Multiple database connectivity
- Support for multiple Web servers
- Support for JMS-based Messaging
- J2EE Connectors
Figure 3 depicts where these services fit into a multitiered application, where they are grouped under presentation logic, business logic, and application services.
Web Services
Web services, built on service-oriented architecture (SOA), is a stack of emerging standards that describe service-oriented and component-based application architecture. It provides a distributed computing technology for revealing the business services of applications on the Internet or intranet using open and standards-based XML protocols and formats. The use of standard XML protocols makes Web services platform language- and vendor-independent and an ideal candidate for use in EAI solutions. It has the potential to quickly replace older technologies such as CORBA, DCOM, and EDI as the preferred way to tackle the challenges of EAI.
Web Services Framework
A Web services framework for EAI has to provide an integrated development environment and platform for easily building and deploying Web services and service components. There are a few essential features that Web services solution vendors will need to incorporate to sucessfully support Web services (see Figure 4):
Easy and secured connectivity to private and public UDDI or any other repository
Effective audit mechanism through which the access and usage of Web services can be closely monitored
Efficient security safeguards such as policy management and authentication, for the access and usage of Web services
Easy development, deployment, publishing, finding, and dynamic binding for Web services interfaces
A stable environment for rapid development of Web services-based applications
J2EE and Web Services
There's a very strong convergence between J2EE and Web services. The new APIs released by Sun, as part of J2EE 1.3, provide a top-to-bottom, end-to-end solution for a Web services-based architecture. J2EE 1.3 simplifies integration with new technologies for Web services, such as Java Message Service (JMS); J2EE Connector Architecture (JCA), Java API for XML Messaging (JAXM), Java API for XML Processing (JAXP), Java API for XML Registries (JAXR), and Java API for XML-based RPC (JAX-RPC).
J2EE-based application servers have to provide all or a subset of the features of the Web services solution discussed in the previous section. Apart from that, they should allow:
Invocation of Web services' existing J2EE applications, such as JSP, servlets, and EJBs using SOAP-based messages
Create Web services out of a stateless Java class, a stateful Java class, and a stateless session Enterprise Java Bean (EJB)
Wrap existing EJB methods as XML operations
Convert an existing J2EE application into a service-oriented architecture using Web services
Enable Web services to inherit all the runtime and life-cycle management elements of J2EE applications
Provide aJava API for UDDI browsing, querying and publishing a Web service as WSDL
It's worth mentioning that the quality of service offered by a J2EE-based application server platform will rely and depend as much on Web services standards and protocols as it will on the maturity, scalability and integrity of the application server itself.
An Example of J2EE and Web Services
The sales department employees of a company use a portal application, running within a J2EE-based application server, to access sales data. As part of the login process, the portal application has to check the authentication (userID/password combination) and authorization (entitlements) of the users. The information about Web services offered by the entitlements application (which may be published by some other group within the company) is obtained from the private/internal UDDI registry and invoked over the intranet. The implementation of the business methods exposed by the Web service is provided by EJBs contained in another application server. This is a typical example of server-to-server application integration using Web services. The sequence of steps follows:
1. The user enters userID/password information on a JSP/HTML front end that is passed over to the portal servlet running within a J2EE-based application server for validation.
2. The servlet supporting the portal framework gets information about Web services that's made available by the entitlements application by doing a lookup in the private UDDI registry.
3. The location and WSDL binding information of Web services is sent to the servlet as a SOAP-based message.
4. The servlet invokes the Web service published by the entitlements application, passing userID and password as a part of a SOAP-based message.
5. The actual implementation of the Web service is provided by EJBs running within another J2EE-based application server. The EJBs use JDBC API to get information from the data source.
6. The EJBs send the Web services response to the portal servlet as a SOAP-based message.
7. Based on the response, the user is either allowed or denied access to the portal application.
As seen in the example, with the use of Web services, integrated applications no longer have to know the specifics of static information, such as how, when, and where. This completely changes the traditional paradigm of point-to-point integration for EAI.
Leading J2EE Application Servers
Within companies there will be a much wider and faster adoption of Web services as integration components of J2EE applications for EAI, if the current leading application servers, such as BEA's WebLogic and IBM's WebSphere, start providing full and complete support for Web services standards.
Let's quickly take into account the state of Web services support by two of the most popular J2EE application servers - Oracle's9i AS, BEA WebLogic, and IBM WebSphere. This information was current as of this writing and based on publicly available information from the vendors.
Oracle9i/AS: Oracle9i JDeveloper facilitates efficient development and deployment of Web services onto Oracle9iAS. OC4J is the runtime platform for Web services. Oracle Enterprise Manager is the Web services management console. Oracle9iAS UDDI registry provides the facility to publish, query, and search a Web service.
BEA WebLogic 6.1: WebLogic Server hosts and exposes simple one-call, one-response Web services. It offers support for the basic protocols and standards, such as SOAP, with support planned for emerging standards such as UDDI and WSDL. It includes support for XML parsing, transformation, and standard support for JAXP 1.1, SAX V2.0, DOM Level 2, and W3C Schema.
IBM WebSphere 4.0: WebSphere Application Server version 4.0 contains integrated support for the key Web services open standards such as Apache SOAP version 2.2, a Java-based implementation of the SOAP 1.1 specification with support for SOAP with attachments; Web Services Description Language version 1.1 processor and generator; Universal Discovery, Description and Integration version 1.0 interface; and UDDI4J, an open-source Java implementation of the UDDI client-side API.
-Apache SOAP version 2.2: A Java-based implementation of the SOAP 1.1 specification with support for SOAP with attachments
-Web Services Description Language: Version 1.1 processor and generator;
-Universal Discovery, Description and Integration: Version 1.0 interface
-UDDI4J: An open-source Java implementation of the UDDI client-side API. UDDI4J contains programming interfaces that applications need to publish, find, and bind to a Web service. It also includes the source code and the complete Javadoc for the APIs
Build On Top of Existing Assets
Companies will be able to lower their investment cost in implementing Web services solutions by building them on top of their existing assets. If a company has invested millions of dollars to put their J2EE-based EAI infrastructure in place, it makes absolutely no sense to abandon it and just embrace Web services.
J2EE-based application servers would provide support for building, deploying, managing, assembling, and executing Web service components. Using existing J2EE application servers, companies should be able to use Web services to quickly and easily integrate their J2EE applications with other technologies and applications across their enterprise. This is the only way to achieve a higher return on investment (ROI) in implementing Web services.
About Gunjan SamtaniGunjan Samtani is Divisional Vice President, Information
Technology at UBS PaineWebber, one of the world's leading financial services
firms. He has several years of experience in the management, design,
architecture, and implementation of large scale EAI and B2B integration
projects. He is the primary author of the upcoming book title "B2B
Integration - A practical guide to collaborative e-commerce"
(http://www.manning.com/samtani/index.html), being published by Manning