Installing PhoenixJMS

There are numerous ways to get PhoenixJMS up and running:

Building from source

You will need Maven to build the project from source. You will also need the Avalon Merlin Maven plugin. Then follow these steps:

  • Check out the latest code from cvs.
  • Copy the contents of /lib to your local maven repository or point to the repository at http://phoenixjms.sf.net/repository
  • To create the Merlin block, run: maven jar:jar .
  • To create the Phoenix sar, run: maven build-sar

Now follow the directions below for your particular container.

Running in PicoContainer

All you really need for PicoContainer is to know the runtime dependencies (see jars in /lib) and fulfill the two contructor dependencies. The string should be a URL pointing to an OpenJMS XML configuration file (one is included in the merlin install) and you'll need to pass an Avalon framework logger in as well. The javadocs should give you mostly what you need. (Note, the constructor automatically calls the needed avalon lifecycles).

Running in Phoenix

  • Download Avalon Phoenix .
  • Download the latest PhoenixJMS SAR.
  • Drop the phoenixjms.sar file into $PHOENIX_HOME/apps
  • Start Phoenix

The default PhoenixJMS SAR embeds the openjmx configuration file. To change this, you'll need to unjar the SAR file, edit the config.xml file contained inside and then repackage it.

Running in Merlin

To run with Merlin, you'll need to do a couple things. The default PhoenixJMS Merlin distribution includes a zip file that you can unpack directly into your MERLIN_HOME directory. You will also need to edit the Merlin shell script to include the following in the java virtual machine parameters:

-Djava.security.policy=$MERLIN_HOME/bin/client.policy

or the following for the batch file (merlin.bat):

-Djava.security.policy=%MERLIN_HOME%/bin/client.policy

If you're using the merlin-server.sh script, then all you need to do is add the above value to the MERLIN_JVM_OPTS parameter.

Adding this line is necessary due to the security policies in Merlin. The default client.policy opens up all permissions. In production installs, you'll want to change this to more secure values. Defaults are also give, but commented out in the included client.policy file.

To start, run:

$ merlin -app $MERLIN_HOME/apps $MERLIN_HOME/repository/pheonixjms/jars/phoenixjms-0.9.0.jar

Configuration

PhoenixJMS simply uses the same basic configuration values as OpenJMS. There are a couple of extra values. Here's an example:


       <configuration>

          <!--
	     Override the base directory for the configuration file
           -->
           <base-dir>/usr/local/merlin/apps/phoenixjms</base-dir>
            
          <!--
              expects openjms.xml configuration file in location indicated below.
              value is appended to either the base-dir value or the 
                context urn:avalon:home or app.home value
            -->
	  <openjms-config>/openjms.xml</openjms-config>
	  
	  <!--
              Alternatively you can embed the OpenJMS configuration
              info right in the Avalon config.  See the Phoenix block
              for details
            -->
	  <openjms>
             <!-- details here -->
          </openjms>	 
       </configuration>

    

See OpenJMS for details on configuration. The defaults provided with the distributions create a JNDI/RMI server on localhost:1099, a "JmsTopicConnectionFactory", a "JmsQueueConnectionFactory" and two preconfigured destinations named "topic" and "queue".