30.9. JOnAS 2.3 to JOnAS 2.4

30.9.1. Introduction

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.

30.9.2. Upgrading your 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 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:

ServiceBefore JOnAS 2.4from JOnAS 2.4
jonas services (new)-

  • jonas.services jmx, security, jtm, dbm, resource, jms, ejb

JMX service configuration-

jonas.service.jmx.class org.objectweb.jonas.jmx.JmxServiceImpl

JOnAS EJB service configuration (beans to be loaded)

jonas.beans.descriptors ...

  • jonas.service.ejb.class org.objectweb.jonas.container.EJBServiceImpl

  • jonas.service.ejb.descriptors ...

JOnAS DBM service configuration

jonas.datasources ...

  • jonas.service.dbm.class org.objectweb.jonas.dbm.DatabaseServiceImpl

  • jonas.service.dbm.datasources ...

JOnAS JTM service configuration

  • 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.service.security.class org.objectweb.jonas.security.JonasSecurityServiceImpl

JOnAS JMS service configuration

  • 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.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.9.3. Upgrading your Jonathan Configuration File

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