Tech > JbossAndJonas

Running JBoss and Jonas



Overview

This document covers running JBoss and Jonas on the same physical machine. This relates to JBoss 3.0.8 (non-Tomcat version) and Jonas 4.1.2.


Configuration

It seems the only default port that conflicts is the that used for the jndi lookup. Port 1099.

This port is configured in <jboss_install_dir>/server/<config_type>/conf/jboss-service.xml

Find the following entry;

<mbean code="org.jboss.naming.NamingService"

and amend the <attribute> tag to

  • <attribute name="Port">1097</attribute>

To run clients, such as JUnit tests, put the following jndi.properties file on the classpath when calling the JBoss server. Make sure this will be the first jndi.properties file to be found on the classpath.

</code>
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://localhost:1097
</code>

Additional notes for JBoss 3.2.6 with Tomcat

There are conflicts which I haven't sorted out as yet. The following notes are a start on sorting them out.

The shutdown.jar supplied with JBoss 3.2.6 requires alteration to it's jndi.properties file.

  • mkdir tmp
  • cd tmp
  • jar -xvf /usr/local/jboss/bin/shutdown.jar

Modify tmp/jndi.properties appropriately

  • mv /usr/local/jboss/bin/shutdown.jar shutdown.old.jar
  • jar -cmvf META-INF/MANIFEST /usr/local/jboss/bin/shutdown.jar *

-- Frank Dean - 9 Feb 2005


-- Frank Dean - 15 Oct 2004

See also JbossHintsAndTips