Assemble the J2EE client application
Use the Application Assembly Tool(AAT) to assemble the J2EE client application. Assemble the J2EE application client on any development machine with the AAT installed. For more information about using AAT, see Application Assembly Tool.
When you use the AAT to assemble your application client, you provide the application client run time with the required information to initialize the execution environment for your client application program. For more information, see Assemble application client modules
and Application client assembly settings.
Here is a list of things to keep in mind when you configure resources that are used by your client application program:
When you configure resource references, resource environment references, and EJB references in the AAT, the General tab contains a required Name field. This field specifies where the application client run time binds the reference to the real object in the java:comp/env portion of the JNDI name space (also known as the short name). The application client run time always binds these references relative to java:comp/env.
For the programming example that is listed in Write the J2EE application client, specify ejb/BasicCalculator in the Name field on the General tab of the AAT, which requires the program to perform a lookup of java:comp/env/ejb/BasicCalculator. If the Name field is set to myString, the resulting lookup is java:comp/env/myString.
- When you configure resource references in the AAT, the Name field on the General tab is used in these cases:
- Binding a reference of that object type into the JNDI name space.
- Retrieving client specific resource configuration information that was configured using the Application Client Resource Configuration Tool (ACRCT).
When you configure a resource reference in the AAT, the value in the Name field on the General tab must match the value in the JNDI Name field on the General tab for the resource in the ACRCT. For more information on the ACRCT, see Start the ACRCT and open an EAR file.
.
When you configure URL resources with the ACRCT, the URL provider panel enables you to specify a protocol and a class to handle that protocol. If you want to use the default protocols, such as HTTP, you can leave those fields blank.
When you configure resource references with the AAT, the General tab contains a field called Authorization. Set this field to either Container or Application. If you set the field to Container, then the application client run time uses authorization information for the resource that was configured in the ACRCT. If the field is set to Application, then the application client run time expects the user application to provide authorization information for the resource. The application client run time ignores any authorization information that is configured with the ACRCT for that resource.
When you configure resource environment references with the AAT, click the Bindings tab to specify the location of the actual object in the server JNDI namespace. A resource environment reference maps a logical name (the Name field on the General tab) used by the client application to the phyiscal name of an object (the JNDI Name field on the Bindings tab). Not all objects that are bound into the server JNDI namespace are intended for use by an application client. For example, the WAS client run time does not support the use of Java 2 Connector (J2C) objects on the client. The object needs to be remotable, and the client-side implementations must be made available on the application client runtime classpath.
Resource environment references are different than resource references. Resource environment references allow your application client to use a logical name to look up a resource that is bound into the server JNDI namespace. A resource reference allows your application to use a logical name to look up a local J2EE resource. The J2EE specification does not specify a particular implementation of a resource.
This table lists the 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 specification of any Datasource implementation class No. java.net.URL Supports specification of custom protocol handlers No. 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.