In a traditional client-server environment, the client requests a service and the server fulfills the request. Multiple clients use a single server. Clients can also access several different servers. This model persists for Java clients except that now these requests use a client runtime environment.
WebSphere Application Server
supports the pluggable client.
In this model, the client application requires a servlet to communicate with the enterprise bean, and the servlet must reside on the same machine as the WebSphere Application Server.
The ActiveX application client model,
uses the Java Native Interface (JNI) architecture to programmatically
access the Java virtual machine (JVM) API. Therefore the JVM code
exists in the same process space as the ActiveX application (Visual
Basic, VBScript, or Active Server Pages (ASP) files) and remains attached
to the process until that process terminates.
The Applet client model has a Java applet
embedded in a HyperText Markup Language (HTML) document residing on
a remote client machine from the WebSphere Application Server. With
this type of client, the user accesses an enterprise bean in the WebSphere
Application Server through the Java applet in the HTML document.
The J2EE application client is a Java application program that accesses enterprise beans, Java DataBase Connectivity (JDBC) APIs, and Java Message Service message queues. The J2EE application client program runs on client machines. This program follows the same Java programming model as other Java programs; however, the J2EE application client depends on the Application Client run time to configure its execution environment, and uses the Java Naming and Directory Interface (JNDI) name space to access resources.
The Pluggable and Thin application clients provide
a lightweight Java client programming model. These clients are useful
in situations where the client application requires a thinner, more
lightweight environment than the one offered by the J2EE application
client. The difference between the Thin application client and the
Pluggable application client is that the Thin application client includes
a Java virtual machine (JVM) API, and the Pluggable application client
requires the user to provide this code. The Pluggable application
client supports the Sun JRE that is directly downloaded from Sun Web
site, however, the Sun JRE has to be the same version as the IBM JRE.
The Application Client for WebSphere Application Server for Windows
installs the ORB.properties file to configure the Sun JRE to use the
IBM ORB implementation that is installed as part of the Pluggable
Application Client. The Thin application client uses the IBM Developer
Kit for the Java platform.
The Thin application client provides a lightweight
Java client programming model. This client is useful in situations
where the client application requires a thinner, more lightweight
environment than the one offered by the J2EE application client.
The J2EE application client programming model provides the benefits of the J2EE platform for the Java client application. Use the J2EE application client to develop, assemble, deploy and launch a client application. The tooling provided with the WebSphere Application Server platform supports the seamless integration of these stages to help the developer create a client application from start to finish.
When you develop a client application using and adhering to the J2EE platform, you can put the client application code from one J2EE platform implementation to another. The client application package can require redeployment using each J2EE platform deployment tool, but the code that comprises the client application remains the same.
The Application 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 supports the Application Client use of nicknames or short names, defined within the client application deployment descriptor. These deployment descriptors identify enterprise beans or local resources (JDBC, Java Message Service (JMS), JavaMail and URL APIs) for simplified resolution through JNDI. This simplified resolution to the enterprise bean reference and local resource reference also eliminates changes to the client application code, when the underlying object or resource either changes or moves to a different server. When these changes occur, the Application Client can require redeployment.
The Application Client also provides initialization of the run-time 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 enterprise beans and local resources.
The Application Client uses the Java Remote Method Invocation-Internet InterORB Protocol (RMI-IIOP). Using this protocol enables the client application to access enterprise bean references and to use Common Object Request Broker Architecture (CORBA) services provided by the J2EE platform implementation. Use of the RMI-IIOP protocol and the accessibility of CORBA services assist users in developing a client application that requires access to both enterprise bean references and CORBA object references.
When you combine the J2EE and CORBA environments or programming models in one client application, you must understand the differences between the two programming models to use and manage each appropriately.
View the Samples gallery for more information about the
Application Client.