Application client model

In a traditional client/server environment, the client requests a service and the server fulfills the request. A single server can be used by multiple clients, and clients can access several different servers.

Prior to the Java 2 Platform Enterprise Edition (J2EE) specification, a typical Web-based client application consisted of one of these models:

In these Web-based models, enterprise beans or other server-side resources are accessed only in server-side processing, such as through running a servlet or JSP.

The Java application client model allows to you create a Java application that communicates directly with an enterprise bean. The Java application can reside on either the application server node or a remote system.

When you develop a client application that adheres to the J2EE platform, you can port the client application code from one J2EE platform implementation to another. The client application package may require redeployment, but the code that comprises the client application does not need to change. The J2EE client run time supplies a container that provides access to system services for the client application code.

The client application code must contain a main() method. The application client run time invokes this main() method after the environment initializes and runs until the Java virtual machine code terminates.

The J2EE platform allows the application client to use nicknames or short names, which are defined within the client application deployment descriptor. These deployment descriptors identify enterprise beans or local resources (JDBC, Java Message Service, JavaMail, and URL APIs) for simplified resolution through the use of Java Naming and Directory Interface (JNDI). This simplified name resolution also eliminates the need for changes to the client application code when the underlying object or resource changes or moves to a different server. (When these changes occur, the application client may require redeployment.)

The WAS client run time also provides initialization of the runtime environment for the client application. The deployment descriptor defines this unique initialization for each client application. The application client run time also provides support for security authentication to the enterprise beans and local resources.