Instructions for Running James in JBoss
This page describes what you need to do in order to get James to run inside the JBoss application server. Unfortunately this is a pretty ugly process, there are two reasons for this. Firstly the JMXLauncher files have not been tagged with the Phoenix release tags so you need to get the trunk revisions from the CVS repository. Secondly James does not work with the trunk revision of Phoenix because of changes to the lifecycle methods in the underlying Avalon framework and components. The latest revision of Phoenix that James will work with is version 4.0.3.
Get and Build Phoenix
Checkout Phoenix version 4.0.3 into a clean directory, the CVS tag for this is Phoenix_4_0_3 and I'll refer to this directory as <phoenix_4_0_3>.
Checkout the trunk revision of Phoenix into a different directory, which I'll refer to as <phoenix_head>.
Copy the following files from <phoenix_head> to <phoenix_4_0_3>
{{{ avalon-phoenix/src/java/org/apache/avalon/phoenix/components/manager/HostedSystemManager.java
- avalon-phoenix/src/java/org/apache/avalon/phoenix/launcher/FreeNEasyPolicy.java avalon-phoenix/src/java/org/apache/avalon/phoenix/launcher/JMXLauncher.java avalon-phoenix/src/java/org/apache/avalon/phoenix/launcher/JMXLauncherMBean.java avalon-phoenix/src/java/org/apache/avalon/phoenix/launcher/LauncherUtils.java avalon-phoenix/src/conf/phoenix-service.xml avalon-phoenix/src/documentation/content/xdocs/jboss-setup.xml }}}
Oh wait, the jboss-setup.xml file is out of date so you can ignore that after all - I've reproduced the instructions from that file in this document anyway!
Build <phoenix_4_0_3>
Install Phoenix in JBoss
- Copy phoenix distribution to Jboss directory:
{{{ mkdir %JBOSS_HOME%\phoenix
copy <phoenix_4_0_3>\dist\* %JBOSS_HOME%\phoenix }}}
- Copy phoenix loader to Jboss deployment dir (using Jboss 'default' server as example):
copy <phoenix_4_0_3>\dist\bin\phoenix-loader.jar %JBOSS_HOME%\server\default\deploy
- Copy phoenix loader config file to Jboss deployment dir (using Jboss 'default' server as example):
<phoenix_4_0_3>\dist\conf\phoenix-service.xml %JBOSS_HOME%\server\default\deploy
- Edit the phoenix kernel configuration file, %JBOSS_HOME%\phoenix\conf\kernel.xml, to use the hosted JMX system manager:
{{{ <component role="org.apache.avalon.phoenix.interfaces.SystemManager"
class="org.apache.avalon.phoenix.components.manager.HostedSystemManager" logger="manager" >
</component> }}}
- Copy the James.sar file to the directory %JBOSS_HOME%\phoenix\apps
- Run JBoss