ITWissen.info - Tech know how online

Java 2 enterprise edition (J2EE)

With the J2EE component model(Java 2 Enterprise Edition), a platform for the development of enterprise-wide applications (Enterprise Application) was already introduced by Sun Microsystems in 2000. These applications can also be distributed applications in the broadest sense. In addition to the platform for the platform-independent execution of programs written in the Java programming language, J2EE integrates a collection of so-called component models. One of the best known component models is probably the Enterprise JavaBeans (EJB) model. The component models are based on the 4-tier architecture of the J2EE architecture.

The specification created by SUN Microsystems includes software components, services as well as interfaces, so that the products of different manufacturers are interoperable if the specification is observed. Sun provides a number of reference implementations that can be used to check the compatibility of your own applications with the J2EE standard. The J2EE component model is available for download at the link below. In addition to the Java Virtual Machine (JVM), a special J2EE application server such as BEA WebLogic is required. J2EE is the basis for the development of many enterprise applications and competes with Microsoft's .NET platform.

The J2EE platform supports the realization of so-called distributed applications - in this case the applications are distributed over several components, which are then largely independent of each other. In a sense, J2EE defines a framework for creating such distributed applications, which in turn are based on a component model. In this context, J2EE is also referred to as a 4-tier architecture - also known as a four-tier model.

J2EE Architecture Model

J2EE Architecture Model

The figure opposite shows an overview of the various components of this architecture, each of which separately defines the actual business logic, the user interface, and an extensive set of so-called services. The J2EE specification defines the following services:

  • JDBC Extension
  • Remote Method Invocation (RMI) - IIOP
  • Enterprise JavaBeans (EJB)
  • Java Servlets
  • Java Server Pages (JSP)
  • Java Messaging Service (JMS)
  • Java Naming and Directory Interface (JNDI)
  • Java TransactionAPI (JTA)
  • Java Mail
In this context, we also talk about the J2EE defining a Java-based application server. This application server provides an integrated infrastructure for the component-based development of application systems, which includes all layers from the client to the database management system (DBMS). The J2EE provides the interfaces as well as the functionality of the runtime environment to realize these distributed applications in a uniform programming model, independent of the manufacturer of the application server. The goal is thus the standardization of the different runtime environments for multi-level application systems, in order to achieve a simplification of the application development. Sun also provides a number of reference implementations, which the respective manufacturer can use to check the compatibility of his application server against the J2EE specification. Application servers are also called middleware systems, since they always implement a software layer called middleware. This can be attributed to the fact that in distributed systems the logical interaction between partners is called middleware - this supports both asynchronous and synchronous forms of communication. In relation to application servers, the term object transaction monitors (OTM) often appears - this refers to distributed transactions over distributed objects.

Brief overview of J2EE technologies

Component Technologies Provide the business logic of an application, using JSP, servlets, and Enterprise JavaBeans (EJB) components. EJBs are divided into Session Beans, Entity Beans and Message Driven Beans.

Service technologies: Provide the components with additional services, such as JDBC, JTA, JNDI, and others.

Communication Technologies Control the communication between components and services. These include the Internet protocols such as HTTP or TCP/IP, SSL protocol; RemoteObject Protocols such as RMI- RMI-IIOP, JavaIDL; Java Messaging Service (JMS) and Java Mail. A central element of the J2EE platform are the containers, an equivalence of the J2EE environment to the Java Virtual Machine (JVM) of the Java Standard Edition (J2SE). Containers provide standardized runtime environments in the form of their own logical systems. These, in turn, then provide components with specific services such as the JDBC extension or component lifecycle management. The J2EE specification distinguishes the following types of containers:

  • EJB containers, the runtime environment for Enterprise Java Beans (EJB),
  • Web containers, the runtime environment for Java Server Pages (JSP) and for servlets
  • JCA containers for integrating heterogeneous applications in the J2EE environment.
By using containers, it is also possible to determine the behavior of an application only at runtime. This is the task of the deployment process within J2EE, which provides special deployment descriptors for this purpose. These are simple text files based on the description language Extensible Markup Language (XML). In this way, the configuration of the components, their relationships to each other, and any external dependencies can be described in the form of a separate XML file.

The component model of the J2EE implements many advantages equally from the view of manufacturers, developers as well as users:

Platform independence J2EE uses the Java platform and is therefore independent of the various system platforms.

Simplified architecture and development A component-based model of an application can be mapped more easily to any functionalities of an application. This also allows developers to work in parallel on the basis of a uniform standard.

Standardization and vendor independence Applications can be developed independently of a manufacturer by adhering to the J2EE specification. Each application can be ported to any J2EE-compatible application server with a minimum of customizing. This also provides the basis for developing stable and scalable applications that can also be maintained or reused.

Enterprise Application Integration J2EE defines the standard for the cooperation of all important information systems in a company - also called Enterprise Information Systems (EIS). Here are the standard services: JDBC, Java Naming and Directory Interface (JNDI), Java Mail, Java Transaction API (JTA), and Java IDL.

Scalability, load balancing and fault tolerance Applications can run on multiple servers in parallel - this requires cluster-capable application servers. By distributing the load across multiple servers, systems can scale within wide limits as well as respond better to fluctuations in load requirements.

The execution of J2EE components always requires the use of the application server already mentioned. A whole range of servers and providers - some commercial and some open source - are available for this purpose. This means that a wide range of applications, from client-server to e-commerce applications, can be covered. However, not all application servers fully comply with the J2EE specification. Therefore there is a list of certified servers from Sun Microsystems. Here is a brief listing of certified J2EE application servers:

  • Commercial servers: BeaWebLogic, SAP NetWeaver Application Server, IBM Web-Sphere Application Server, Oracle Application Server.
  • Open Source Servers: Glashfish, JBoss, Apache Geronimo.
Also on the side of the implementation of J2EE applications in connection with the porting to different servers one often finds in practice that this project is connected with problems. These can usually be traced back to the fact that the implementation uses manufacturer-specific interfaces.

Informationen zum Artikel
Englisch: Java 2 enterprise edition - J2EE
Updated at: 17.07.2012
#Words: 2068
Links: