30.4. JOnAS 3.1 to JOnAS 3.1.4

Applications developed for JOnAS 3.1 do not require changes; however, they should be redeployed (GenIC). The migration affects only certain customized configuration files and build.xml files.

The main changes are in the area of communication protocols support, due to the integration of CAROL. This implies the following configuration changes:

Refer to Section 3.3 Configuring the Communication Protocol and JNDI for details about communication protocol configuration.

Other configuration changes are due to security enhancements:

Refer to Section 3.5.9 Configuring the Security Service for details about security configuration.

The preferred steps for migrating from JOnAS 3.1 are the following:

  1. Create a new JOnAS_BASE (for example, through the ANT create_jonasbase target).

  2. Copy the new as well as any customized files from the old JONAS_BASE to the new one, conforming to the new configuration rules (jndi.properties replaced by carol.properties, security-context propagation and realm specified in jonas.properties, new realm specification in server.xml, changes in your build.xml files, and the content of tomcat-users.xml, jonas-users.properties, or jettyRealm.properties should migrate into jonas-realm.xml).

Details for migrating a configuration are provided in the following sections.

30.4.1. carol.properties

Modify this file according to the content of the old jndi.properties file. If the OBJECTWEB_ORB was RMI, set carol.protocols to jrmp; if the OBJECTWEB_ORB was JEREMIE, set carol.protocols to jeremie. Then, configure the URL with host name and port number. Example:

carol.protocols=jrmp
carol.jrmp.url=rmi://localhost:1099

30.4.2. jonas.properties

If EJB security was used, the security context propagation should be activated. A realm resource can be chosen to be accessed from Java; this is now specified in the jonas.properties file:

   
jonas.security.propagation  true
jonas.service.security.ejbrealm memrlm_1
jonas.services  registry,jmx,jtm,dbm,security,jms,ejb,web,ear

30.4.3. server.xml

Choose the memory, database, or ldap realm resource for Tomcat authentication.

  
<Realm className="org.objectweb.jonas.security.realm.JRealmCatalina41" 
   debug="99" resourceName="memrlm_1"/>

30.4.4. web-jetty.xml

This file is located in the WEB-INF directory of a WAR file and contains a reference to the JOnAS Realm to be used for authentication.

  
<Call name="setRealmName">
   <Arg>Example Basic Authentication Area</Arg>
</Call>
<Call name="setRealm">
   <Arg>
      <New class="org.objectweb.jonas.security.realm.JRealmJetty42">
         <Arg>Example Basic Authentication Area</Arg>
         <Arg>memrlm_1</Arg>
      </New>
   </Arg>
</Call>

30.4.5. Deployment

For existing scripts that call GenIC for deploying EJBs, the -secpropag option no longer exists (security propagation is activated from the jonas.properties file as illustrated previously), and a new option -protocols specifies a comma-separated list of protocols (chosen from jeremie, jrmp, iiop, cmi) for which stubs will be generated. The default value is jrmp,jeremie.

  
GenIC -protocols jrmp,jeremie,iiop

Refer to the following for the deployment Ant task.

30.4.6. build.xml files

The build.xml files for building JOnAS examples have been upgraded according to the new configuration scheme. Existing build.xml files must be updated the same way: