This chapter is intended for JOnAS users migrating applications from JOnAS 2.3 to JOnAS 2.4 and later versions. This migration does not affect EJB components' files. However, two configuration files are slightly different: the jonas.properties file and the jonathan.xml file.
jonas.properties: Due to the new JOnAS architecture regarding services (refer to Chapter 24 JOnAS Services), the structure of the properties defined in this file has changed. It is necessary to upgrade a jonas.properties file written for a version 2.x (x<4) to reuse it for JOnAS 2.4.
jonathan.xml: For applications using the JEREMIE distribution mechanism, it is necessary to upgrade this configuration file, since JOnAS has embedded a new version of Jonathan.
JOnAS EJB servers are configured via the jonas.properties file. This configuration file may be located in three different places:
$JONAS_ROOT/config/jonas.properties
$HOME/jonas.properties: the home directory
./jonas.properties: the directory from which the EJB server is launched.
An EJB server reads the three potential files in this order listed (1, 2, 3), each one possibly overwriting properties defined in a previous file. Therefore, existing jonas.properties files from previous JOnAS versions must be upgraded in order to retain the configuration settings, by making the following structural changes:
Service | Before JOnAS 2.4 | from JOnAS 2.4 |
---|---|---|
jonas services (new) | - |
|
JMX service configuration | - | jonas.service.jmx.class org.objectweb.jonas.jmx.JmxServiceImpl |
JOnAS EJB service configuration (beans to be loaded) | jonas.beans.descriptors ... |
|
JOnAS DBM service configuration | jonas.datasources ... |
|
JOnAS JTM service configuration |
|
|
JOnAS SECURITY service configuration | - | jonas.service.security.class org.objectweb.jonas.security.JonasSecurityServiceImpl |
JOnAS JMS service configuration |
|
|
JOnAS RESOURCE service configuration (Resource Adapters to be installed) | - |
|
The main transformation rule is that most of the properties are now part of a JOnAS service. For each service XXX, the class property jonas.service.XXX.class containing the name of the service class (all these class properties are set in the $JONAS_ROOT/config/jonas.properties file) must be specified, and each additional property p related to the service is named jonas.service.XXX.p. The list of services to be launched with the server is specified in the jonas.services property. These services are EJB (in which are defined the beans to be loaded), JTM (in which are defined the transaction monitor properties), DBM (in which are defined the datasources), SECURITY, JMS (the messaging service), and JMX (a new service for management).