MDS Usage

The current alpha release of PhoenixMDS only supports Merlin 3.0, but eventually it will support other containers. To configure your component to take advantage of PhoenixMDS:

  1. Add the following to your component meta-tags:

    @avalon.stage id="urn:mds:listener"
  2. Add the following line to your component's configuration:

    <subscriber connection="${messenger.name}" subject="${topic.or.queue.name}"/>
  3. Add the MDSManager component to your block:

    <include name="mds-manager" id="phoenixjms-mds:phoenixjms-mds" version="0.1"/>

Configuration

PhoenixJMS uses the Jakarta Commons Messenger component for handling JMS connections. You can therefore use a Messenger.xml file to configure an MDSManager object:

     <configuration>
       <messenger-conf>/Messenger.xml</messenger-conf>
       <delay>4000</delay>
     </configuration>
    

The delay parameter is used to pause start up of the MDSManager so that if your also running an embedded JMS server (like PhoenixJMS) you can give the JMS server time to start before MDSManager attempts to connect. Yes, it's a hack.

Messenger.xml

Example Messenger.xml file:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE manager SYSTEM "messenger.dtd">

<manager>
	<messenger name="topic">
		<jndi lookupName="JmsTopicConnectionFactory">
			<property>
				<name>java.naming.factory.initial</name>
				<value>org.exolab.jms.jndi.rmi.RmiJndiInitialContextFactory</value>
			</property>
			<property>
				<name>java.naming.provider.url</name>
				<value>rmi://localhost:1099/JndiServer</value>
			</property>
		</jndi>
	</messenger>
	<messenger name="queue">
		<jndi lookupName="JmsQueueConnectionFactory">
			<property>
				<name>java.naming.factory.initial</name>
				<value>org.exolab.jms.jndi.rmi.RmiJndiInitialContextFactory</value>
			</property>
			<property>
				<name>java.naming.provider.url</name>
				<value>rmi://localhost:1099/JndiServer</value>
			</property>
		</jndi>
	</messenger>
</manager>