The target audience for this guide is the Client Component provider, i.e. the person in charge of developing the client components on the client side.
The content of this guide is the following:
The J2EE client application is a .jar file which can be
All the files required to launch the client container are in the
JONAS_ROOT/lib/client.jar
file. This jar includes a manifest
file with the name of the class to launch. To launch the client container,
simply type:
java -jar $JONAS_ROOT/lib/client.jar -?
. This will launch the
client container and display usage information about this client
container.
To launch the client container on a remote computer, copy the client.jar
and invoke the client container by typing java -jar
path_to_your/client.jar.
The client that must be launched by the client container is given as an
argument of the client container.
example : java -jar client.jar myApplication.ear
or java -jar client.jar myClient.jar
.
Defining the JNDI access and the protocol to use is an important part of
configuration.
The JOnAS server, as well as the ClientContainer, uses the values specified
in the carol.properties
file.
This file can be used at different levels.
The carol.properties
is searched with the following priority
(high to low):
thecarol.properties
specified by
the -carolFile argument to the
client container
carol.properties
packaged into the client application
(the jar client)carol.properties
contained in the
JONAS_ROOT/lib/client.jar.
A convenient way is to update the
with your customized carol.properties of
your
client.jarcarol.properties
file.
ie : jar -uf client.jar carol.properties
The client container client.jar
includes a
traceclient.properties
file. This is the same file as the one in
JONAS_ROOT/conf
directory.
A different configuration file can be used for the traces by specifying the
parameter -traceFile
when invoking the client container.
The file in the client.jar
can also replaced with the command
jar -uf client.jar traceclient.properties
An ear can contain many java clients, which are described in the
application.xml
file inside the
<module><java>
elements.
To invoke the client container with an ear, such as java -jar
client.jar my.ear
, specify the java client to use if there are many
clients. Otherwise, it will take the first client.
To specify the jar client to use from an ear, use the argument
-jarClient
and supply the name of the client to use.
The earsample
example in the JOnAS examples has two java clients
in its ear.
By default, the client container will use the system property
java.io.tmpdir.
To use another temporary directory, specify the path by giving the argument
-tmpDir
to the client
container.
The earsample
and jaasclient
examples of the
JOnAS examples are packaged for use by the client container.
The first example demonstrates the client inside an ear. The second example
demonstrates the use of a standalone client.