IBM


14.4.1 Defining application client bindings

The Plants by WebSphere sample application does not provide any client application. For the purpose of discussing the client container, we will therefore use the WebSphere Bank sample application that was shipped with WAS V6.0 but has been removed in V6.1.

WebSphere Bank provides four client applications: the GetAccounts, FindAccounts, TransferWS and TransferJMS clients. The various client applications demonstrate the capabilities of the WebSphere Bank sample application.

For an application client to be able to access resources, such as EJBs provided by a J2EE server application, the proper bindings must be set up. We need to specify the complete naming structure to reach the server where the EJBs are deployed. For example, the machine where we deployed the application for testing has the ND version installed. The WebSphere Bank application is running in the WebSphereBank appserver on node amsterdamNode1.

Therefore, the ejb/Bank/Customer EJB reference can be bound to:

cell/nodes/amsterdamNode1/servers/WebSphereBankServer/ejb/Bank/Customer

If you have created a cluster of appservers, use:

cell/clusters/<clusterName>/ejb/Bank/Customer

You will also need to change the provider URL, according to the target server. If you are running in a single server environment you can simply use:

ejb/Bank/Customer

When you have configured the proper bindings for the resources, export the EAR file and copy it to the client machine. Although you do not need the complete contents of the EAR file to run the application client, for example, the Web modules, it is better to keep a single EAR file. This is mainly for maintenance purposes.


Redbooks ibm.com/redbooks

Next