30.11. JOnAS 2.3 to JOnAS 2.4

30.11.1. Introduction

This 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 the advanced topic 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 because JOnAS has embedded a new version of Jonathan.

30.11.2. Upgrading the jonas.properties file

JOnAS EJB servers are configured via the jonas.properties file. This configuration file may be located in three different places:

  1. $JONAS_ROOT/config/jonas.properties

  2. $HOME/jonas.properties: the home directory

  3. ./jonas.properties: the directory from which the EJB server is launched.

An EJB server reads the three potential files in the order listed, 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:

jonas services (new)

JOnAS 2.4.3from JOnAS 2.4.4
-

jonas.services

jmx,security,jtm,dbm,resource,jms,ejb

JMX service configuration

JOnAS 2.4.3from JOnAS 2.4.4
-

jonas.service.jmx.class

org.objectweb.jonas.jmx.JmxServiceImpl

 

 

JOnAS EJB service configuration (beans to be loaded)

JOnAS 2.4.3from JOnAS 2.4.4
jonas.beans.descriptors ...

jonas.service.ejb.class

org.objectweb.jonas.container.EJBServiceImpl

jonas.service.ejb.descriptors ...

JOnAS DBM Service Configuration

JOnAS 2.4.3from JOnAS 2.4.4
jonas.datasources ...

jonas.service.dbm.class

org.objectweb.jonas.dbm.DataBaseServiceImpl

jonas.service.dbm.datasources ...

JOnAS JTM Service Configuration

JOnAS 2.4.3from JOnAS 2.4.4
jonas.tm.remote false jonas.tm.timeout 60

jonas.service.jtm.class

org.objectweb.jonas.jtm.TransactionServiceImpl

jonas.service.jtm.remote false

jonas.service.jtm.timeout 60

JOnAS Security Service Configuration

JOnAS 2.4.3from JOnAS 2.4.4
-

jonas.service.security.class

org.objectweb.jonas.security.JonasSecurityServiceImpl

 

 

 

 

JOnAS JMS Service Configuration

JOnAS 2.4.3from JOnAS 2.4.4

jonas.jms.mom

org.objectweb.jonas_jms.JmsAdminForJoram

jonas.jms.collocated true

jonas.jms.url joram://localhost:16010

jonas.jms.threadpoolsize 10

jonas.jms.topics sampleTopic

jonas.jms.queues ...

jonas.service.jms.class

org.objectweb.jonas.jms.JmsServiceImpl

jonas.service.jms.mom

org.objectweb.jonas_jms.JmsAdminForJoram

jonas.service.jms.collocated true

jonas.service.jms.url

joram://localhost:16010

jonas.service.ejb.mdbthreadpoolsize 10

jonas.service.jms.topics sampleTopic

jonas.service.jms.queues ...

JOnAS Resource Service Configuration (Resource Adapters to be installed)

JOnAS 2.4.3from JOnAS 2.4.4
-

jonas.service.resource.class

org.objectweb.jonas.resource.ResourceServiceImpl

jonas.service.resource.resources ...

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).

30.11.3. Upgrading the Jonathan configuration file

In the new version of Jonathan, jonathan.prop has been replaced by jonathan.xml.