This chapter describes how to configure JOnAS.
As described in Chapter 2 Getting Started with JOnAS, JOnAS is pre-configured and ready to use directly with RMI/JRMP for remote access, if visibility to classes other than those contained in the JOnAS distribution in $JONAS_ROOT/lib is not required.
To use RMI/IIOP for remote access or to work with additional Java classes (for example, JDBC driver classes), you must perform additional configuration tasks, such as setting a specific port number for the registry.
The JOnAS distribution contains a number of configuration files in $JONAS_ROOT/conf directory. These files can be edited to change the default configuration. However, it is recommended that the configuration files needed by a specific application running on JOnAS be placed in a separate location. This is done by using an additional environment variable called JONAS_BASE.
Warning | |
---|---|
JOnAS configuration files are read from the $JONAS_BASE/conf directory. If JONAS_BASE is not defined, it is automatically initialized to $JONAS_ROOT. |
There are two ways to use the JONAS_BASE environment variable:
Perform the following actions:
Create a new directory and initialize JONAS_BASE with the path to this directory.
Create the following sub-directories in $JONAS_BASE:
conf
ejbjars
apps
webapps
rars
logs
Copy the configuration files located in $JONAS_ROOT/conf into $JONAS_BASE/conf. Then, modify the configuration files according to the requirements of your application, as explained in the following sections.
Perform the following actions:
Initialize $JONAS_BASE with a path.
Change to the $JONAS_ROOT directory and enter:
ant create_jonasbase |
This copies all the required files and creates all the directories.
Note | |
---|---|
The build.xml files provided with the JOnAS examples support JONAS_BASE. If this environment variable is defined prior to building and installing the examples, the generated archives are installed under the appropriate sub-directory of $JONAS_BASE. For example, the EJB-JAR files corresponding to the sample examples of $JONAS_ROOT/examples/src/ are installed in $JONAS_BASE/ejbjars. |