The J2EE Specification

In addition to defining the interfaces required for building an enterprise-distributed application, the best feature about the J2EE specification is that it describes what is required from vendor providers, but does not suggest how interfaces should be implemented. Therein lies the formula for success: flexibility, scalability, and making provisions for J2EE and the other specifications’ growth by receiving input from other major third-party vendors and the entire Java community. J2EE is the obvious choice for developing secure distributed applications.

The J2EE’s multicomponent infrastructure is defined as five functional technologies. The first three technologies listed here are discussed in this chapter, the last two in Chapter 9 and Appendix A:

  • Communications

  • Presentation

  • Business applications

  • Security (Chapter 9)

  • Enterprise information system enabling technologies (Appendix A)

Table 2-1 lists the Java technologies, their acronyms, and current version.

Table 2-1: J2EE Technologies

J2EE Specification



Communication Technologies

Java Message Service



Java Mail



JavaBean Activation Framework



Java Interface Definition Language (part of J2SE 1.3)



Remote Method Invocation-Internet Inter-ORB Protocol



Extensible Markup Language



Java Naming and Directory Interface



Java Authorization and Authentication Service




Java servlet



Java Server Pages



Java API for XML Parsing



Business Applications

Java Database Connectivity Extension



Enterprise JavaBeans



Java Transaction API



Java Connector Architecture (Appendix A)

JCA or Connector


The Communication Technologies

The eight Java technologies that make up the communications component facilitate client-side business component communications. They are described briefly in the following sections.

Java Message Service (JMS) 1.0.2

Business enterprise applications require facilities for exchanging messages. JMS offers a unified-standard messaging API for supporting several different messaging formats, including XML. The JMS API supports two types of messages:

  • Point-to-point

  • Publish-subscribe

Java Mail (JavaMail) 1.2

Email pervades our professional and personal lives every day. An email is both platform and protocol agnostic.

JavaBean Activation Framework (JAF) 1.0.1

The JAF represents a “smart” application framework. It is capable of analyzing new data, abstracting the data’s operations, and making them available to other application components. This is essential where new data formats are evolving. The JAF is somewhat comparable in functionality to Microsoft .NET’s Framework v.1.1. Frameworks are where all application-centric functionality is defined and managed. As new technologies evolve, and as new data types and development languages emerge, they rely on the framework to support and manage the new technologies.

Java Interface Definition Language (JavaIDL) 1.3

Typically, business applications contain legacy applications that need to be integrated with newly created Java applications. The Java IDL is an Object Request Broker that comes bundled with the Java 2 Standard Edition (J2SE) and allows J2EE components to invoke requests on external CORBA objects using IIOP as the protocol.

Remote Method Invocation and Internet Inter-ORB Protocol (RMI-IIOP) 1.0

All interaction between components in a distributed environment consists of client calls to remote objects residing on different machines. RMI uses the Java Remote Method Protocol (JRMP) for communications with remote objects. RMI works only in a Java environment, whereas the Internet Inter-ORB protocol (IIOP) represents a CORBA- based standard, which is independent of the underlying protocol. CORBA is the glue that facilitates interoperability with non-Java and CORBA clients. Subsequently, RMI and IIOP were merged to provide cross-platform communications, a real win-win for developers.

Extensible Markup Language (XML)

XML is the markup language of choice for enabling businesses to define object behavior and provide data-format-independent representations in an extensible manner. XML facilitates transmission of data over the wire and penetrates corporate firewalls seamlessly.

This explains why XML is a core component of every enterprise application in both Java and .NET-oriented web services. For example, all distributed applications employ XML for creating web-config files, for creating deployment descriptors, and for providing metadata to applications via a methodology called reflection.

Java Naming and Directory Interface (JNDI) 1.2

In a distributed environment, services and objects require a standard, uniform, and transparent method for locating objects residing on different servers on a network. JNDI provides this methodology. It enables applications to access resources distributed throughout the network. J2EE uses JNDI and RMI-IIOP for finding the remote objects.

Java Authentication and Authorization Service (JAAS)

Security-enabling technologies facilitate J2EE application security implementations by providing authentication and authorization services to users before accessing enterprise resources. JAAS is the primary technology for supporting these services. A container such as WebSphere automatically provides them.

The Presentation Technologies

The three presentation-oriented technologies include Java servlets, Java Server Pages (JSPs), and Java API for XML Parsing (JAXP).

Java Servlets 2.3

Servlets represent server-side Java objects that function as an intermediary between web clients and other business objects (JavaBeans or Enterprise JavaBeans). The beans support the execution of business logic and interact with database objects. In essence, servlets implement the presentation logic and manage requests from web browsers to business components.

Java Server Pages (JSPs) 1.2

Java Server Pages are a servlet extension designed to construct dynamic presentation- oriented applications. A JSP page consists of directives and code fragments that provide functionality similar to ASP.NET pages. Once the servlet accepts a client request and delegates the requested task to a business logic–oriented JavaBean or EJB, it designates a Java Server Page for returning any requested business result to the client via HTTP and HTML. JSPs can interact with business components.

Java API for XML Parsing (JAXP) 1.1

JAXP is the technology employed for parsing and transforming XML documents into an appropriate format using the standard Java APIs. JAXP supports the Simple API for XML (SAX 2.0), Document Object Model (DOM), and XSLT, the XML designated transformation language.


For an extensive treatment of the DOM, SAX 2, and XSLT, refer to my book, XML: Language Mechanics and Applications (Pearson Addison Wesley, 2003).

The Business Application Technologies

The business applications are discussed separately in later chapters of the book (JCA and its specification are covered in Appendix A). Here, I will concentrate on Enterprise JavaBeans (EJBs) 2.0, which is the focal point for the J2EE platform.

J2EE is component centric, providing an extensive collection of reusable interfaces for developing distributed applications for the enterprise. The business application component consists of an EJB container that provides the runtime environment for Enterprise JavaBeans. The container (such as WebSphere or BEA’s WebLogic) supports and implements tasks such as automatic garbage collection, memory management, application server start-up and shutdown services, user authentication and authorization, and other container-managed services. The various components are embedded with the container. Figure 2-1 displays a physical layout of a J2EE component container and its hosted standard protocols.

click to expand
Figure 2-1: A J2EE web container

The Client Tier

A rich client can be both proprietary standalone Java applications and non-Java applications. Rich clients are capable of accessing both RDBMS and ERP services directly via JDBC connectors. They may also access the EJB web container residing within WebSphere or BEA’s WebLogic. The web container contains both servlets and JSP pages that can access the Enterprise JavaBeans.

A thin client residing on a client tier supports the HTML container (browser), HTML, and applets. Thin clients access the web container via HTTP/HTTPS, XML, and HTML. They are also capable of using JDBC connectors to access a relational database and ERP applications.

The Presentation Tier

This tier hosts the web container that supports Java servlets, Java Server Pages, and Java API for XML Parsing, and the XSLT transformation services. These technologies employ both RMI-IIOP and vendor-proprietary protocols for accessing the remote objects.

The Business Tier

This tier hosts the EJB container and provides support for business transactions executed by EJBs. The business beans utilize the JDBC and JTC connectors to interact with an RDBMS and ERP business solution.

The Enterprise Information Services Tier

This tier facilitates cross-platform interaction with enterprise legacy systems. It separates data, including the database, enterprise resource planning, and mainframe transaction processing, from the business and client tiers. J2EE designates two technologies for providing portable access to the EIS tier: JDBC and the Connector technology.

.NET & J2EE Interoperability
Microsoft .NET and J2EE Interoperability Toolkit (Pro-Developer)
ISBN: 0735619220
EAN: 2147483647
Year: 2004
Pages: 101
Authors: Simon Guest © 2008-2017.
If you may any questions please contact us: