JOnAS Versions Migration Guide

 

JOnAS 2.6.4 to JOnAS 3.0 beta

Application with entity beans CMP 1.1

For applications deployed in previous versions of JOnAS and using entity beans that have container-managed persistence CMP 1.1, the standard deployment descriptor must be updated. For such entity beans, a <cmp-version> tag, with value 1.x must be added. For example a deployment descriptor like this:

    <persistence-type>container</persistence-type>
    <cmp-field>
      <field-name>fieldOne</field-name>
    </cmp-field>
    <cmp-field>
      <field-name>fieldTwo</field-name>
    </cmp-field>
    
must be changed as:
    <persistence-type>container</persistence-type>
    <cmp-version>1.x</cmp-version>
    <cmp-field>
      <field-name>fieldOne</field-name>
    </cmp-field>
    <cmp-field>
      <field-name>fieldTwo</field-name>
    </cmp-field>
    
The EJB 2.0 specification specifies that the default value of the <cmp-version> tag is 2.x.

JOnAS 2.6 to JOnAS 2.6.1

Installation procedure

When JOnAS is installed on a host, and before using it, you must run ant install in the JOnAS_ROOT directory to rebuild global libraries depending on your environment (RMI/JEREMIE, web environment). This must be done again if you decide to switch orb (i.e. from RMI to JEREMIE) or if you change your web environment (i.e. switching from CATALINA to JETTY)

EJB container creation

As required by several JOnAS users, in JOnAS version 2.6.1 it is yet possible to create an EJB container from an EJB deployment descriptor identified by its xml file name, as it was possible in versions anterior to JOnAS 2.6.

JOnAS 2.5 to JOnAS 2.6

No more building with Make

The make tool is no more used to build JOnAS and the JOnAS examples. Common makefiles previously used to build the JOnAS examples via make, are no more delivered in $JONAS_ROOT/gmk.
The only build tool used in JOnAS 2.6 is Ant.

Building with Ant 1.5

In JOnAS 2.6, the required version of Ant is 1.5 (instead of Ant 1.4).
Furthermore, since this version, an ant task ejbjar for JOnAS is delivered in the JOnAS distribution. Have a look to the JOnAS example to see how to use this new task.

New jonas command

A new jonas command is delivered. This command allows to:

The EJBServer, JonasAdmin and CheckEnv commands are now deprecated.
See the JOnAS Commands Reference Guide in the JOnAS documentation for details.

EJB container creation

In previous versions of JOnAS, an EJB container could be created from an ejb-jar file or from an EJB deployment descriptor identified by its xml file name.
In JOnAS version 2.6, an EJB container can only be created from an ejb-jar file.
This means that you can no more specify an xml file name:

Tomcat 4.0.x Support

Tomcat version 4.0.1 is no more supported. The current supported versions are Tomcat 4.0.3 and Tomcat 4.0.4.

Tomcat Service and Web Container Service

JOnAS 2.6 is a full J2EE application server, so Tomcat may be used with JOnAS as Web container. This functionnality is set up via the JOnAS service web. In earlier version of JOnAS a service tomcat was provided. This service tomcat is now deprecated because it was not compliant to J2EE specification. Not that if you was previously using the tomcat service and are now using the web container service, you should suppress from your CATALINA_HOME/webapps directory the war files (and expanded directories) that were deployed here (they are now deployed in JONAS_ROOT/webapps).

See the Integrating Tomcat and JOnAS for details.

JOnAS 2.4.4 to JOnAS 2.5

Tomcat 4.0.x Support

JOnAS 2.5 supports two versions of Tomcat for the tomcat service: Tomcat 3.3.x (as in JOnAS 2.4.4) and Tomcat 4.0.x. The default behaviour is to use Tomcat 3.3.x, so you have nothing to change if you were using the tomcat service with JOnAS 2.4.4. If you intend to use Tomcat 4.0.x, you have to set the jonas.service.tomcat.class property of jonas.properties file to org.objectweb.jonas.tomcat.EmbeddedTomcatImpl40. See more details in the How to use Tomcat with JOnAS document.

trace.properties

Since JOnAS 2.5, the Objectweb Monolog logging API is used for JOnAS traces. The JOnAS traces configuration file trace.properties has changed, see the Configuration Guide in the JOnAS documentation for details.

JOnAS 2.4.3 to JOnAS 2.4.4

The main difference is that in JOnAS 2.4.4 there are two new services : registry and tomcat
JOnAS 2.4.3 from JOnAS 2.4.4
jonas services
  • jonas.services   jmx,security,jtm,dbm,resource,jms,ejb
  • jonas.services   registry,tomcat,jmx,security,jtm,dbm,resource,jms,ejb
Registry service configuration -
  • jonas.service.registry.class  org.objectweb.jonas.registry.RegistryServiceImpl
  • jonas.service.registry.mode  automatic
Tomcat service configuration -
  • jonas.service.tomcat.class  org.objectweb.jonas.tomcat.EmbeddedTomcatImpl33
  • jonas.service.tomcat.args 

JOnAS 2.3 to JOnAS 2.4

Introduction

This chapter is dedicated to JOnAS users migrating applications from JOnAS 2.3 to JOnAS 2.4 and later versions. EJB components files are not concerned by this migration, however two configuration files are slightly different: the jonas.properties file and the jonathan.xml file.

Upgrading your jonas.properties file

The jonas.properties file allows to configure JOnAS EJB servers. Such a configuration file may be located at three differents places:

  1. $JONAS_ROOT/config/jonas.properties
  2. $HOME/jonas.properties: your home directory
  3. ./jonas.properties: the directory where the EJB server is launched.

An EJB server reads the three possible files in this order (1, 2, 3), each one may overwrite properties defined in a previous file. So you may have existing jonas.properties files from previous JOnAS versions that you want to upgrade, in order to keep your configuration settings. You need to perform the following structuration changes:

before JOnAS 2.4 from 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, and for each service XXX you must specify 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), and each other 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 you define the beans to be loaded), JTM (in which you define the transaction monitor properties), DBM (in which you define the datasources), SECURITY, JMS (the messaging service), and JMX (a new service for management).

Upgrading your Jonathan configuration file

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