Home
Introduction to Java EE application clients
A J2EE application server, like WebSphere Application Server, exposes several types of resources to remote clients:
Enterprise JavaBeans (EJBs)
JDBC data sources
Java Message Service (JMS) resources (queues and topics)
Java Naming and Directory Interface (JNDI) services These resources are most often accessed from a component that is running within the Java EE application server itself, such as an EJB, servlet, or JSP. However, these resources can also be used from a stand-alone Java application (known as a Java EE Application Client) running in its own Java Virtual Machine (JVM), possibly on a different computer from the server. Figure | 7-1 shows the resource access scenarios described.
Figure 17-1 Java applications using Java EE server resources
Note: The clients shown in Figure | 7-1 might conceptually be running on the same physical node, or even in the same JVM as the application server. However, in this chapter the focus is on clients running in distributed environments. Throughout this chapter, we develop an EJB client, invoking the EJBs from Chapter | 4, Developing EJB applications, to provide a simple ITSO Bank client application.
Because a regular JVM does not support accessing such application server resources, additional setup for the runtime environment is required for a Java EE application. There are two methods to achieve this:
Add the required packages to the Java Runtime Environment manually.
Package the application according to the Java EE application client specification and execute the application in a Java EE application client container. In this chapter, we focus on the second of these options. In addition to providing the correct runtime resources for Java applications accessing Java EE server resources, the Java EE application client container provides additional features, such as mapping references to JNDI names and integration with server security features.
IBM WebSphere Application Server v7.0 includes a Java EE application client container and a facility for launching Java EE application clients. The Java EE application client container, known as Application Client for WebSphere Application Server, can be installed separately from the WebSphere Application Server installation CDs, or downloaded from developerWorks, and runs a completely separate JVM on the client machine.
When the JVM starts, it loads the necessary runtime support classes to make it possible to communicate with WebSphere Application Server and to support Java EE application clients that will use server-side resources. Refer to the WebSphere Application Server Information Center for more information about installing and using the Application Client for WebSphere Application Server.
Note: Although the Java EE specification describes the JAR format as the packaging format for Java EE application clients, the Application Client for WebSphere Application Server expects the application to be packaged as a JAR inside an Enterprise Application Archive (EAR). The Application Client for WebSphere Application Server does not support execution of a standalone Java client JAR.
RAD v7.5 includes tooling to assist with developing and configuring Java EE application clients, and a test facility that allows Java EE application clients to be executed in an appropriate container. The focus of this chapter is on the Application Developer tooling for Java EE application clients, so we will be looking only at this facility.
ibm.com/redbooks