Technical Article

The All New J2EE 1.4 Platform

Qusay H. Mahmoud
December 2003

The Java 2 Platform, Enterprise Edition (J2EE) version 1.4 is finally here. It is a complete implementation of the J2EE 1.4 specification, featuring the integration of Java technology with web services in a single platform, and is designed to provider support for developing web services and distributed multi-tier enterprise applications. This article provides a technical overview of J2EE 1.4, describing the new features and explaining why it is the platform of choice for developing and deploying web services and enterprise applications.

J2EE 1.4 is Here

J2EE has emerged, since it was first released in 1999, as an integrated standard for implementing and deploying portable, multi-tiered enterprise applications. The success of the J2EE platform can be partly attributed to the way the platform was designed -- through an open process (the Java Community Process). More recently, the J2EE platform has evolved further to integrate the growing popularity of web services. The J2EE 1.4 platform features a number of new capabilities, as well as enhancements to core J2EE technologies such as Servlets, JavaServer Pages (JSPs), and Enterprise JavaBeans (EJBs). The most exciting new feature, however, is the support for web services; J2EE 1.4 supports universal web service standards like SOAP, UDDI, WSDL, and WS-I Basic Profile 1.0. The portability of J2EE and the interoperability of web services are combined to provide a unique platform for building, deploying, and managing web services and enterprise applications.

The J2EE 1.4 platform lets you integrate the application server into the enterprise IT infrastructure to deliver the latest functionality in web services. It enables businesses to expose their existing J2EE applications as web services. Servlets and Enterprise JavaBeans (EJBs) can be exposed as web services that can be accessed by Java-based or non-Java-based web service clients. J2EE applications can act as web service clients themselves, and they can communicate with other web services, regardless of how they are implemented.

What are Web Services?

Web services are software systems designed to support interoperable machine-to-machine interaction over a network in a heterogeneous environment. This interoperability is gained through a set of XML-based open standards, such as the Web Services Description Language (WSDL), the Simple Object Access Protocol (SOAP), and Universal Description, Discovery, and Integration (UDDI). These standards provide a common and interoperable approach for defining, publishing, and using web services. Figure 1 illustrates how the JAXR and JAX-RPC APIs play a role in publishing, discovering, and using web services.

Figure 1: J2EE 1.4 Publish-Discover-Invoke model

Figure 1: J2EE 1.4 Publish-Discover-Invoke model

From a software architect's point of view, a web service can be considered as a service-oriented architecture, which consists of a collection of services that communicate with each other (and end-user clients) through well-defined interfaces. One advantage of service-oriented architecture is that it allows development of loosely coupled applications that can be distributed and accessed from any client across the network.

Benefits of the J2EE 1.4 Platform

The new J2EE 1.4 platform is the perfect choice for developing web services and enterprise applications simply because it offers many benefits to developers including:

  1. Enhanced development productivity: J2EE uses a component-based model for application development. This approach enhances development productivity because well-designed generic components can be reused and mapped to the desired functionality of the application and service to be developed.
  2. Support for emerging web service standards: The J2EE 1.4 platform provides comprehensive support for web services and the WS-I Basic Profile. This ensures that applications can be easily exposed as web services. More importantly, this ensures that web services developed using the J2EE 1.4 platform are portable not only across J2EE implementations but are also interoperable with any web service developed using any platform that conforms to WS-I standards.
  3. Provides industry-standard APIs, such as the JDBC API, JMS, and J2EE Connector Architecture for accessing Enterprise Information Systems (EIS). And with the new support for web services, J2EE 1.4 is the perfect platform for integrating existing EIS by exposing their data to clients running on heterogeneous platforms.
  4. Scalable to meet demand variation: J2EE containers provide mechanisms to support scaling with no coding, transaction support, database connections, and life cycle management that is scalable and requires no coding from application developers.
  5. Provides a flexible security model: The security model is designed to be flexible. It allows application developers to easily set the security requirements for components at the method level. Only users with the appropriate permissions would be able to access specific data operations.

What's New in J2EE 1.4

  • Provides complete web service support through the JAX-RPC API, which enables development of interoperable web services based on accepted standards such as SOAP and WSDL.
  • Web Services for J2EE specification (JSR 109), which focuses on the programming model for implementing web services as well as deploying web services.
  • Supports the WS-I Basic Profile 1.0. This really means that in addition to platform independence, J2EE 1.4 offers web services interoperability in a heterogeneous environment.
  • Introduces a new J2EE Management 1.0 API that defines the information model for J2EE management. This API uses the Java Management Extensions API (JMX)
  • Introduces a new J2EE Deployment 1.1 API providing a standard API for deploying J2EE applications. This means that developers will be able to use any tool that supports J2EE 1.4 to deploy to applications to any J2EE 1.4 application server regardless of the vendor.
  • Makes it easier to develop web front ends with Servlets and JSPs. Servlets now support request listeners and enhanced filters. JSP technology has simplified development models through a simple expression language and tag files.
  • Includes an implementation of the EJB 2.1 specification that features
    • Enabling stateless session beans to be exposed as web service endpoints;
    • Timer service;
    • Message-driven bean generalization with corresponding support in Connector 1.5;
    • EJB QL enhancements.
  • Provides enhancements to:
    • J2EE Connector Architecture that now supports integration with asynchronous messaging systems and the ability to plug in JMS providers.
    • Deployment descriptors (conversion of deployment descriptors from DTDs to XML Schemas), which are now defined using XML Schema. Can be used by developers to validate their XML structures.
  • Introduces the Java Authorization Service Provider Contract for Containers (JACC), which is used to define a contract between a J2EE application server and an authorization service provider. This allows custom authorization service providers to be plugged into any J2EE product.

Figure 2 depicts the J2EE architecture and shows how the new APIs fit in the J2EE 1.4 platform. The figure shows the logical relationships of the architectural elements. The containers, which are represented using rectangles, provide services to the application components (applets, application clients, JSP, servlets, EJBs). As an example, the web container provides services such as JAX-RPC, SAAJ, JAXR, JMX to JSPs and Servlets, as well as to other services.

Figure 2: The J2EE 1.4 platform architecture

Figure 2: The J2EE 1.4 platform architecture

Web Service APIs in J2EE 1.4

The J2EE 1.4 platform provides the web Services APIs that are shown in Table 1.

Table 1: Web Services APIs provided by J2EE 1.4

API Description
This API lets you develop SOAP-based portable and interoperable web services. It supports remote procedure calling using SOAP over HTTP and HTTPS.
This is an abstract uniform Java API for accessing different kinds of XML registries. It provides you with a single set of APIs to access a variety of XML registries, including UDDI and the ebXML Registry. You don't need to worry about the nitty-gritty details of each registry's information model.
This API lets you produce and consume messages conforming to the SOAP 1.1 specification and SOAP with Attachments note
JSR 109: Web services for J2EE JSR 109 defines deployment requirements for web services clients and endpoints by leveraging the JAX-RPC programming model. In addition, it defines standard deployment descriptors using the XML Schema, thereby providing a uniform method to deploy web services on J2EE 1.4 compatible application servers via a wide range of tools.

Note: JAX-RPC and SAAJ include support for the Web Services Interoperability (WS-I) and the Web Services Interoperability Basic Profile (WSI-BP), currently being developed by, which provides a set of guidelines on how to develop interoperable web services.

With the APIs described in Table 1, you can focus on high-level programming tasks, rather than low-level issues of XML and web services. In other words, you can start developing and using J2EE 1.4 web services without knowing much about XML and web services standards. You only deal with Java semantics, such as method invocation and data types. The dirty work is done behind the scenes, as discussed further in the next section.

Web Service Implementation in J2EE 1.4

The J2EE 1.4 platform allows you to define interfaces for web services and describe these interfaces with WSDL and publish them in UDDI registries. These interfaces form the endpoints for your web service, whose methods can be invoked by clients running on any platform. J2EE 1.4 also allows you to implement the actual business logic for these interfaces using servlets or stateless session beans. For more information, please refer to Service Endpoint Design.

Once a web service is discovered, the client makes a request to a web service. The web service processes the request and sends the response back to the client. To get a feeling for what happens behind the scenes, consider Figure 3, which shows how a Java client communicates with a Java web service in the J2EE 1.4 platform. Note that J2EE applications can use web services published by other providers, regardless of how they are implemented. In the case of non-Java-based clients and services, the figure would change slightly. As mentioned earlier, all the details between the request and the response happen behind the scenes. You only deal with typical Java programming language semantics, such as Java method calls, Java data types, and so forth. You needn't worry about mapping Java to XML and vice-versa, or constructing SOAP messages. All this low-level work is done behind the scenes, allowing you to focus on the high-level issues.

Figure 3: A Java client calling a J2EE Web service

Figure 3: A Java client calling a J2EE Web service

To learn about the different techniques that can be used by a client to access any web service, please see the Client Design chapter of the Web Services BluePrints.

Migrate Applications to the J2EE 1.4 Application Server

The J2EE 1.4 requires complete binary compatibility with previous versions. This helps the Enterprise protect their investment in IT and still take advantage of new ways to reduce complexity and cost. The task of migrating applications from other application servers to J2EE 1.4 can be automated using the Migration Tool for the J2EE 1.4 Application Server, which is available for Solaris, Windows, and Linux. It supports the migration of applications to the J2EE 1.4 Application Server from the following source application servers: J2EE 1.4 SDK Beta 1, J2EE SDK 1.3, Sun ONE Application Server 6.0 and 6.5, Sun ONE Web Server 6.0, JBoss 3.0, WebLogic Server 5.1, 6.0, and 6.1, WebSphere Application Server 4.0, and Apache Tomcat 4.1. Limitations and known issues for the tool are listed in the release notes.

Start Building J2EE 1.4 Web Services and Enterprise Apps Today

Download the J2EE 1.4 SDK here The SDK includes the runtime environment and tools needed to start building web services and enterprise applications immediately. Once you have downloaded and installed the J2EE SDK, you should take a look at Sun's Java Adventure Builder, a complete sample J2EE 1.4 application that demonstrates how to implement web services; it comes with code and documentation. The Java Adventure Builder and other sample applications such as the Smart Ticket Application and the Pet Store are part of the Java BluePrints, which provide guidelines, design patterns, and sample code for completely functional end-to-end applications. Also, it is worth reading the recommendations and guidelines that are being put together for implementing web services on J2EE 1.4.

Figure 4: Java Adventure Builder (J2EE 1.4)

Figure 4: Java Adventure Builder (J2EE 1.4)


Web services are the next step in the Web's evolution, since they promise the infrastructure and tools for automation of business-to-business relationships over the Internet. The integration of web services into the J2EE 1.4 platform simplifies the task of building and consuming web services, by freeing the Java technology developer from the low-level details of XML and web services standards.

The primary focus of J2EE 1.4 is the support for web services. The JAX-RPC and SAAJ APIs provide the basic web service interoperability support. The web services for J2EE specifications focuses on the packaging and deployment requirements for J2EE applications that provide and use web services. In a world of constantly changing technology requirements, J2EE is leading the way to enable the Enterprise to integrate the latest and greatest technology standards while still leveraging their existing IT investment.

For More Information


Special thanks to Dennis MacNeil, and Larry Freeman of Sun Microsystems, whose feedback helped me improve this article.