[jboss-cvs] JBoss Messaging SVN: r3960 - branches/Branch_Stable/docs/userguide/en/modules.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 27 07:19:45 EDT 2008
Author: ataylor
Date: 2008-03-27 07:19:45 -0400 (Thu, 27 Mar 2008)
New Revision: 3960
Modified:
branches/Branch_Stable/docs/userguide/en/modules/installation.xml
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-1242 - added Migrating Messages from JBoss MQ to JBoss Messaging chapter
Modified: branches/Branch_Stable/docs/userguide/en/modules/installation.xml
===================================================================
--- branches/Branch_Stable/docs/userguide/en/modules/installation.xml 2008-03-27 11:09:40 UTC (rev 3959)
+++ branches/Branch_Stable/docs/userguide/en/modules/installation.xml 2008-03-27 11:19:45 UTC (rev 3960)
@@ -959,4 +959,209 @@
</listitem>
</itemizedlist>
</section>
+ <section id="inst.mqmessagemigration">
+ <title>Migrating Messages from JBoss MQ to JBoss Messaging</title>
+ <para>This configuration will allow you to migrate your systems using JBossMQ to JBM(JBoss Messaging).
+ Many Enterprise systems are complex and have multiple applications and can't be migrated from JBossMQ to
+ JBM all at one time.</para>
+ <para>Made up Use Case: For instance, your business is selling items, some you make directly and some you farm
+ out to other distributors. Your ordering system is JBossMQ based. Customers place orders that are then queued
+ up to be processed(via JBossMQ). You also use MQ to queue up the orders that you need to produce and you also
+ queue up the orders that will go to your other distributors. You use MDB's in three separate places in your
+ operation. You want to do a staged migration from JBossMQ to JBM. That requires that JBossMQ and JBM work
+ together. This is exactly what the JBM bridge was meant to do. It's meant to take messages from one queue/topic
+ and transfer them to another queue/topic. This helps with the migration by allowing you to pull messages from
+ your JBossMQ queues automatically and push them into your JBM Queues. You can also do the opposite, you can
+ push messages from your JBM system to your JBossMQ system. In our example, we want to replace the ordering
+ side(producer) with JBM. We push messages into the JBM Order queue, but we set the bridge up to send all of
+ those messages to the JBossMQ Order queue. The rest of your processing happens as normal. Lets say you want
+ to leave your ordering system intact, but you want to have JBM and EJB3 MDBs process the orders. You can have
+ your old client put messages in JBossMQ as normal, but you set the bridge up to pull the messages from JBossMQ
+ Order queue and push them into the JBM Order queue.</para>
+ <para>This allows JBM and JBossMQ to interact together by pushing messages back and forth between different systems.</para>
+ <para>The Following Assumptions are made:</para>
+ <itemizedlist>
+ <listitem>You have one JBoss instance set up for JBoss Messaging and One Jboss instance set up that has your old JBoss MQ on it.</listitem>
+ <listitem>We are copying messages from JBossMQ(Source) to JBM(Target)</listitem>
+ </itemizedlist>
+ <section id="inst.mqmessagemigration.steps">
+ <title>Steps to Set up the bridge</title>
+ <itemizedlist>
+ <listitem>
+ <para>Copy the jbossmq.jar from the Source Machine(JBossMQ) under the server/default/lib/ to the
+ messaging configuration on the Target JBM machine(server/messaging/lib)</para>
+ <note>substitute what ever your messaging server configuration is above. I used the default stand alone
+ messaging server configuration note: This is required to dereference the JBossMQ objects that are
+ dereferenced on the JBM side. If you don't copy the jar over, you will get a
+ "java.lang.ClassCastException: javax.naming.Reference" exception and the bridge will not be able to start</note>
+ </listitem>
+ <listitem><para>Add the remote JBossMQ provider to the jms-ds.xml file in the server/messaging/deploy
+ directory on your target(JBM) machine.</para>
+ <para>Here is an example of the provider to add.</para>
+ <programlisting>
+<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
+ name="jboss.messaging:service=JMSProviderLoader,
+ name=MyRemoteJMSProvider">
+ <attribute name="ProviderName">RemoteXAConnectionFactory</attribute>
+ <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+ <!-- The combined connection factory -->
+ <attribute name="FactoryRef">XAConnectionFactory</attribute>
+ <!-- The queue connection factory -->
+ <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
+ <!-- The topic factory -->
+ <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
+ <attribute name="Properties">
+ java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+ java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+ java.naming.provider.url=192.168.0.199:1099
+ </attribute>
+</mbean>
+ </programlisting>
+ <note>you will need to change the java.naming.provider.url so that it points to your JBossMQ machine.
+ Everything else should remain the same. Keep your jms-ds.xml file open, because you will be addning
+ another entry in it for the next step.</note>
+ </listitem>
+ <listitem>
+ <para>Add the Bridge provider to the jms-ds.xml file in the server/messaging/deploy directory on your
+ target(JBM) machine.</para>
+ <para>Here is an example bridge configuration</para>
+ <programlisting>
+<mbean code="org.jboss.jms.server.bridge.BridgeService"
+ name="jboss.messaging:service=Bridge,name=TestBridge"
+ xmbean-dd="xmdesc/Bridge-xmbean.xml">
+ <depends optional-attribute-name="SourceProviderLoader">
+ jboss.messaging:service=JMSProviderLoader,
+ name=MyRemoteJMSProvider</depends>
+ <depends optional-attribute-name="TargetProviderLoader">
+ jboss.messaging:service=JMSProviderLoader,
+ name=JMSProvider</depends>
+ <attribute name="SourceDestinationLookup">/queue/testQueue</attribute>
+ <attribute name="TargetDestinationLookup">/queue/A</attribute>
+ <attribute name="QualityOfServiceMode">0</attribute>
+ <attribute name="MaxBatchSize">5</attribute>
+ <attribute name="MaxBatchTime">-1</attribute>
+ <attribute name="FailureRetryInterval">5000</attribute>
+ <attribute name="MaxRetries">-1</attribute>
+ <attribute name="AddMessageIDInHeader">false</attribute>
+</mbean>
+ </programlisting>
+ <note>my target is the current JBM JMS Provider and the source is the JBossMQ remote provider. If you
+ have a pretty stock system and you want to move messages from JBossMQ to JBM, you will not have to
+ change this example except for the queue Names. If you wish to move from JBM to JBossMQ, just switch
+ the soure and target definitions.</note>
+ </listitem>
+ </itemizedlist>
+ <para>Start the JBossMQ system and then just start the JBM system and the messages will begin to move over.</para>
+ <para>The following is an example of the jms-ds.xml file that was used for the test. If you want to test the bridge first
+ and you have a stock JBM system(JBM has been installed using the default configuration), then you can just
+ copy the jms-ds.xml file over the one in server/messaging/deploy and begin to put messages in the JBossMQ
+ system under the /queue/TestQueue. The messages will then be moved over to your JBM queue /queue/A. Both of
+ these queues exist in the stock versions of JBM and JBossMQ.</para>
+ </section>
+ <programlisting>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<connection-factories>
+
+ <!-- ==================================================================== -->
+ <!-- JMS Stuff -->
+ <!-- ==================================================================== -->
+
+ <!-- The JMS provider loader -->
+ <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
+ name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">
+ <attribute name="ProviderName">DefaultJMSProvider</attribute>
+
+ <attribute name="ProviderAdapterClass">
+ org.jboss.jms.jndi.JNDIProviderAdapter
+ </attribute>
+ <!-- The combined connection factory -->
+ <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+ <!-- The queue connection factory -->
+ <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+ <!-- The topic factory -->
+
+ <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+ <!-- Uncomment to use HAJNDI to access JMS
+ <attribute name="Properties">
+ java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+ java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+ java.naming.provider.url=localhost:1100
+ </attribute>
+ -->
+ </mbean>
+
+
+<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
+ name="jboss.messaging:service=JMSProviderLoader,
+ name=MyRemoteJMSProvider">
+ <attribute name="ProviderName">RemoteXAConnectionFactory</attribute>
+ <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+ <!-- The combined connection factory -->
+
+ <attribute name="FactoryRef">XAConnectionFactory</attribute>
+ <!-- The queue connection factory -->
+ <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
+ <!-- The topic factory -->
+ <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
+ <attribute name="Properties">
+ java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+ java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+ java.naming.provider.url=192.168.0.199:1099
+ </attribute>
+
+</mbean>
+
+<mbean code="org.jboss.jms.server.bridge.BridgeService"
+ name="jboss.messaging:service=Bridge,name=TestBridge"
+ xmbean-dd="xmdesc/Bridge-xmbean.xml">
+ <depends optional-attribute-name="SourceProviderLoader">
+ jboss.messaging:service=JMSProviderLoader,
+ name=MyRemoteJMSProvider</depends>
+ <depends optional-attribute-name="TargetProviderLoader">
+ jboss.messaging:service=JMSProviderLoader,
+ name=JMSProvider</depends>
+ <attribute name="SourceDestinationLookup">/queue/testQueue</attribute>
+ <attribute name="TargetDestinationLookup">/queue/A</attribute>
+ <attribute name="QualityOfServiceMode">0</attribute>
+
+ <attribute name="MaxBatchSize">5</attribute>
+ <attribute name="MaxBatchTime">-1</attribute>
+ <attribute name="FailureRetryInterval">5000</attribute>
+ <attribute name="MaxRetries">-1</attribute>
+ <attribute name="AddMessageIDInHeader">false</attribute>
+</mbean>
+
+ <!-- The server session pool for Message Driven Beans -->
+ <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
+ name="jboss.messaging:service=ServerSessionPoolMBean,name=StdJMSPool">
+ <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
+ <attribute name="PoolName">StdJMSPool</attribute>
+ <attribute name="PoolFactoryClass">
+ org.jboss.jms.asf.StdServerSessionPoolFactory
+ </attribute>
+ </mbean>
+
+ <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
+ <tx-connection-factory>
+ <jndi-name>JmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>jms-ra.rar</rar-name>
+ <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory
+ </connection-definition>
+ <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic
+ </config-property>
+
+ <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">
+ java:/DefaultJMSProvider</config-property>
+ <max-pool-size>20</max-pool-size>
+ <security-domain-and-application>JmsXARealm</security-domain-and-application>
+ </tx-connection-factory>
+
+</connection-factories>
+
+ </programlisting>
+ <para>You can also merge topics back and forth from JBM to JBossMQ, by setting the subscription name and client id.
+ You can see these arguments in the JBM Bridge chapter. </para>
+ </section>
</chapter>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list