- 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. Apart from the platform for the platform-independent execution of programs, which were written in the programming language Java, J2EE integrates an accumulation of so-called component models. One of the most well-known component models is thereby probably the model of the Enterprise JavaBeans( EJB). The component models orient themselves at the 4-Tier-Architektur of the J2EE-Architektur.

The specification provided by SUN Microsystems covers software components, services as well as interfaces, so that with observance of the specification the products of different manufacturers are interoperable. In addition Sun provides a set of reference implementations, with which the compatibility degree of own applications can be examined regarding 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 and others 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. J2EE defines thus so to speak a framework for the production of such distributed applications, which are based again on a component model. J2EE is called in this connection also 4-Tier-Architektur - also four layer model.

J2EE architecture model

J2EE architecture model

The adjacent figure shows an overview of the different components of this architecture, which define the actual business logic, the user interface and an extensive set of so-called services in each case separately from one another. 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 Transaction API( JTA)
  • Java Mail

In this connection one speaks also of the fact that the J2EE defines 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). By the J2EE the interfaces as well as the functionality of the run time environment are made available, in order to realize these distributed application independently of the manufacturer of the application server in a uniform programming model. The goal is thus the standardization of the different run time environments for multi- level application systems, in order to achieve thereby a simplification of the application development. Sun also provides a number of reference implementations for this purpose, on the basis of which the respective manufacturer can check the compatibility of his application server against the J2EE specification. Application servers are also called middleware systems, because they always implement a software layer, the so-called middleware. This can be traced back 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.

Short overview of the technologies of the J2EE

Component technologies Provide the business logic of an application. For this the components JSP, Servlets as well as the Enterprise JavaBeans (EJB) are available. EJBs are divided into Session Beans, Entity Beans and Message Driven Beans.

Service technologies Provide additional services to the components, for example, JDBC, JTA, JNDI, and others.

Communication technologies Rules communication between components and services. Here are to be mentioned the Internet protocols such as HTTP or TCP/ IP, SSL protocol; Remote Object 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 separate 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 container, the runtime environment for Enterprise Java Beans (EJB),
  • Web containers, the runtime environment for Java Server Pages (JSP) and for servlets
  • JCA containers for the integration of heterogeneous applications in the J2EE environment.

The use of containers also makes it possible to determine the behavior of an application only at runtime. This is the task of the so-called deployment process within J2EE, which offers special deployment descriptors for this purpose. These are simple text files based on the description language Extensible Markup Language(XML). Thus the configuration of the components, their relations among themselves as well as if necessary external dependence can be described in form of a separate XML file.

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

Platform independence J2EE uses the Java platform and is thus 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 enables 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. At the same time, each application can be ported to any J2EE-compatible application server with a minimum ofcustomizing. 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 the standard services are mentioned: 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. For this purpose, a whole range of servers and providers - some commercial and some open source - are available. This means that a wide range of applications, from client-server to e-commerce applications, can be covered. However not all application servers fulfill the defaults of the J2EE specification in its entirety. 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 implementation of J2EE applications, in connection with 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 vendor-specific interfaces.

Englisch: Java 2 enterprise edition - J2EE
Updated at: 17.07.2012
#Words: 1217
Links: component model, Java, platform, distributed applications, programming language (PL)
Translations: DE

All rights reserved DATACOM Buchverlag GmbH © 2023