|
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.
J2EE Specification | Acronyms | Version |
---|---|---|
Communication Technologies | ||
Java Message Service | JMS | 1.0.2 |
Java Mail | JavaMail | 1.2 |
JavaBean Activation Framework | JAF | 1.0 |
Java Interface Definition Language (part of J2SE 1.3) | JavaIDL | 1.3 |
Remote Method Invocation-Internet Inter-ORB Protocol | RMI-IIOP | 1.0 |
Extensible Markup Language | XML | 1.0 |
Java Naming and Directory Interface | JNDI | 1.2 |
Java Authorization and Authentication Service | JAAS | 1.0 |
Presentation | ||
Java servlet | Servlet | 2.3 |
Java Server Pages | JSPs | 1.2 |
Java API for XML Parsing | JAXP | 1.1 |
Business Applications | ||
Java Database Connectivity Extension | JDBC | 2.0 |
Enterprise JavaBeans | EJBs | 2.0 |
Java Transaction API | JTA | 1.0 |
Java Connector Architecture (Appendix A) | JCA or Connector | 1.0 |
The eight Java technologies that make up the communications component facilitate client-side business component communications. They are described briefly in the following sections.
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
Email pervades our professional and personal lives every day. An email is both platform and protocol agnostic.
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.
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.
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.
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.
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.
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 three presentation-oriented technologies include Java servlets, Java Server Pages (JSPs), and Java API for XML Parsing (JAXP).
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 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.
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.
Note | 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 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.
Figure 2-1: A J2EE web container
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.
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.
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.
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.
|