This chapter is for the Client component provider; that is, the person in charge of developing the client components on the client side. It describes how the client components should be packaged.
Client components are packaged for deployment in a standard Java programming language Archive file called a JAR file (Java ARchive). The document root contains a subdirectory called META-INF, which contains the following files and directories:
application-client.xml: The standard XML deployment descriptor in the format defined in the J2EE 1.3 Specification. Refer to $JONAS_ROOT/xml/application-client_1_4.xsd.
jonas-client.xml: The optional JOnAS-specific, XML deployment descriptor in the format defined in $JONAS_ROOT/xml/jonas-client_X_Y.xsd.
The manifest of this client JAR must contain the name of the class to launch (containing the main method). This is defined by the value of the Main-Class attribute of the manifest file. For a standalone client (not bundled in an EAR), all the EJB classes (except the skeleton) on which lookups will be performed must be included.
Two examples of building a Java client are provided:
The first is the build.xml of the earsample example with a Java client inside the EAR (see http://jonas.objectweb.org/current/examples/earsample/build.xml). Refer to the client1jar and client2jar targets.
The second is the build.xml of the jaasclient example with a Java standalone client, which performs a lookup on an EJB.
See http://jonas.objectweb.org/current/examples/jaasclient/build.xml; refer to the clientjars target.