+

Search Tips   |   Advanced Search

Develop a Java EE client application


This page provides the steps required to develop code for a Java EE client application.

 

  1. 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 WAS.

  2. 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 the 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 the client application, consider the following items:

    • Resource environment references are different than resource references. Resource environment references allow the client application to use a logical name to look up a resource bound into the server JNDI namespace. A resource reference allows the application to use a logical name to look up a local Java EE resource. The Java EE spec does not specify a particular implementation of a resource.

      The following table contains supported resource types and identifies the resources to which the WAS provides a client implementation.

      Resource Type Client Configuration Notes Client implementation provided by WAS
      javax.sql.DataSource Supports spec of any data source implementation class No
      java.net.URL Supports spec of custom protocol handlers Provided by Java Runtime Environment files
      javax.mail.Session Supports custom protocol configuration Yes - POP3, SMTP, IMAP
      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

  3. Assemble the 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 apps or WAR files

    • Metadata describing the applications or application XML files

 

Next steps

After developing the Java EE client application code, deploy the application onto the client machines where the client application is to run.


Assembling Java EE client applications
Java EE client application class loading

 

Related concepts


Assembly tools