Developing a Java EE client application
Develop code for a Java™ Platform, Enterprise Edition (Java EE) client application.
Procedure
- Write the client application program. Write
the Java EE client application on any development
machine. At this stage, you do not require access to the WebSphere® Application Server.
Rules: If you are writing a client application program that will run on z/OS®, the following rules apply:
- Client programs may start their own transactions but cannot join in or start transactions in the WebSphere Application Server for z/OS run-time.
- Client application code must contain a main method.
- All input and output files for the client application must be in ASCII, because the client run-time runs in an ASCII JVM.
- Assemble the client application JAR file using an assembly
tool.
The JNDI namespace knows what to return on a lookup because of the information assembled by the assembly tool.
Assemble the client application on any development machine with the assembly tool installed.
When you assemble your client application, provide the required information to initialize the runtime environment for your client application. For information about how to provide the required information, see the documentation for the assembly tool.
When you configure resources for use by your client application, consider the following items:
- Resource environment references are different than resource references.
Resource environment references enables your client application to
use a logical name to look up a resource bound into the server JNDI
namespace. A resource reference enables your application to use a
logical name to look up a local Java EE
resource. The Java EE specification does not specify
a particular implementation of a resource. The following table contains
supported resource types and identifies the resources to which the WebSphere Application Server provides a
client implementation.
Table 1. Supported resource types and resource identifiers. Supported resource types Resource Type Client Configuration Notes® Client implementation provided by WebSphere Application Server javax.sql.DataSource Supports specification of any data source implementation class No java.net.URL Supports specification of custom protocol handlers Provided by Java Runtime Environment files javax.mail.Session Supports custom protocol configuration Yes - POP3/POP3S, SMTP/SMTPS, IMAP/IMAPS javax.jms.QueueConnectionFactory, javax.jms.TopicConnectionFactory, javax.jms.Queue, javax.jms.Topic Supports configuration of WebSphere embedded messaging, IBM® MQ Series and other JMS providers Yes - WebSphere embedded messaging
- Resource environment references are different than resource references.
Resource environment references enables your client application to
use a logical name to look up a resource bound into the server JNDI
namespace. A resource reference enables your application to use a
logical name to look up a local Java EE
resource. The Java EE specification does not specify
a particular implementation of a resource. The following table contains
supported resource types and identifies the resources to which the WebSphere Application Server provides a
client implementation.
- Assemble the Enterprise Archive (EAR) file.
The application is contained in an enterprise archive (EAR file). The EAR file is composed of:
- Enterprise bean, application client, and user-defined modules or JAR files
- Web applications or WAR files
- Metadata describing the applications or application XML files
What to do next
Subtopics
Java EE client application class loading
When you run your Java Platform, Enterprise Edition (Java EE) application client, a hierarchy of class loaders is created to load classes used by your application.Assembling Java EE client applications
Application client projects contain programs that run on networked client systems. An application client project is deployed as a Java archive (JAR) file.
Related concepts:
Related tasks:


File name: tcli_developjava.html