J2EE Architecure, Components & Application

J2EE is a technology to develop distributed, scalable, enterprise application.

The J2EE platform uses a distributed multitiered application model for enterprise applications. Application logic is divided into components according to function, and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multitiered J2EE environment to which the application component belongs.
  • Client-tier components run on the client machine.
  • Web-tier components run on the J2EE server.
  • Business-tier components run on the J2EE server.
  • Enterprise information system (EIS)-tier software runs on the EIS server.
  • What Is the J2EE Platform?

    The J2EE platform is particularly suited for the development and deployment of enterprise Web-based applications that use the Java programming language. Its architecture provides both server- and client-side support for both enterprise and Web-based applications that run in multi-tiered environments. The figure below shows the J2EE support for a typical multi-tier architecture.

    Multi-tier applications usually are configured into three parts: a client tier, a middle tier, and an EIS tier. The client tier may include browser-based clients, peer enterprise applications, and Java-based client applications. The middle tier supports modules that provide application services to the client and that implement the application’s business logic. Keep in mind that there can be more than one such middle tier. The enterprise information system (EIS) tier (sometimes referred to as the back-end tier) supports the enterprise information systems that manage and store enterprise critical data and functions. The Connector architecture integrates applications that are in the middle tier application server with the EIS tier.

      For example, the J2EE architecture supports multi-tier applications that might be divided along the following lines:

    • A Web browser-based client. Often, such a client encompasses the presentation logic.

    • An application server with an EJB container and a Web container. The EJB container handles the business logic tier. The Web container, using servlets, JSPs, and so forth, provides services for the generation of dynamic and static content targeted for Web browser-based clients.

    A relational database or legacy system such as the EIS tier, connected to the middle tier via the Connector architecture.
       The J2EE architecture is designed to support distributed application development. That is, in a J2EE multi-tier environment, each part of the application can run on a different platform or node. In fact, the middle tier itself is not restricted to one tier, but may be divided into sub-tiers and these sub-tiers distributed across nodes.

    CONTAINERS:

    J2EE server:
    The runtime portion of a J2EE product. A J2EE server provides EJB and web containers.
    Enterprise JavaBeans (EJB) container:
    Manages the execution of enterprise beans for J2EE applications. Enterprise beans and their container run on the J2EE server. 
    Web container:
    Manages the execution of JSP page and servlet components for J2EE applications. Web components and their container run on the J2EE server.
    Application client container:
    Manages the execution of application client components. Application clients and their container run on the client. 
    Applet container:
    Manages the execution of applets. Consists of a web browser and Java Plug-in running on the client together.
     

    The JDBC API provides database-independent connectivity between the J2EE platform and a wide variety of relational databases. Using the JDBC API, an application can perform such functions as connect to a database server, manage transactions, execute stored procedures and SQL statements, and retrieve stored data.

    The J2EE platform provides a messaging technology for asynchronous messaging. Java Message Service (JMS) is an API for using enterprise messaging systems. Such messages contain information describing specific business actions. JMS supports both point-to-point queue-based and publish-subscribe messaging.

    JavaMail is an API for an electronic mail system. Its abstract classes and interfaces support various implementations of message stores, formats, and transports. JavaMail uses the JavaBeans Activation Framework (JAF) to integrate support for MIME data types into the Java platform. Applications do not use JAF directly.

    The Remote Method Invocation (RMI) set of APIs allows developers to build distributed applications in the Java environment. RMI-IIOP is an implementation of the RMI API over the Internet Inter-ORB Protocol (IIOP). This implementation permits developers to write remote interfaces in Java. The remote interface can be converted to the Interface Definition Language (IDL) and then can be implemented in any other language that supports Object Management Group (OMG) protocols and includes an Object Request Broker (ORB) library. Thus RMI-IIOP provides interoperability with CORBA objects implemented in any language. 

    Enterprise Information System Tier

    The enterprise information system tier handles EIS software and includes enterprise infrastructure systems such as enterprise resource planning (ERP), mainframe transaction processing, database systems, and other legacy information systems. For example, J2EE application components might need access to enterprise information systems for database connectivity.