How to setup Jboss 7.1 such that a MDB can communicate with a JBoss 4.2.3 JMS instance?
stevemebius Apr 13, 2012 2:33 AMI have a JBoss 4.2.3 MDB which is talking to a JBoss 4.2.3 JMS instance.
Now I want to migrate the MDB to JBoss 7.1.1 but keep talking to the same JBoss 4.2.3 JMS instance (as phrase 1).
I think I need to add some setup in standalone.xml but I don't know exactly what to add, or where, or how.
The anontation of my MDB code looks like this:
======
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "auto-acknowledge"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "/topic/broadcast"),
@ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "channel='general'"),
@ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
@ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "xyz-broadcast"),
@ActivationConfigProperty(propertyName = "clientId", propertyValue = "listener-xyz"),
@ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue = "java:/RemoteJMSProvider") })
// We are using Spring transaction management so disable CMT
@TransactionManagement(TransactionManagementType.BEAN)
=====
My Jboss 4.2.3 setup (default/deploy/jms/jms-ds.xml) for JMS looks like this:
======
...
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider,server=remotehost">
<attribute name="ProviderName">RemoteJMSProvider</attribute>
<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
<!-- The connection factory -->
<attribute name="FactoryRef">UIL2XAConnectionFactory</attribute>
<!-- The queue connection factory -->
<attribute name="QueueFactoryRef">UIL2XAConnectionFactory</attribute>
<!-- The topic factory -->
<attribute name="TopicFactoryRef">UIL2XAConnectionFactory</attribute>
<!-- Connect to JNDI on the host "the-remote-host-name" port 1099-->
<attribute name="Properties">
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jnp.interfaces
java.naming.provider.url=hostxyz:1099
</attribute>
</mbean>
=========
I think I can reuse the existing jbossall-client.jar to provide me all the needed classes for accessing JNP protocol.
I think all I need is the right configuration in Jboss 7.1.1 to complete the task.
Could someone help, please?
Thanks,
Steve Mebius