It seems like this should be pretty easy, and it probably is, but...

I'm trying to configure a JBoss 5.0.1.GA instance to use both it own local JBM 
instance as well as connect to a remote JBoss 5.0.1.GA instance (also using 
JBM). Ultimately I want to be able to use EJB3 MDBs on local and remote queues 
and topics I've tried using the configurations I've found on the Wiki, and net 
which all basically look like this:

  | <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
  |     name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">
  |   <attribute name="ProviderName">DFMJMSProvider</attribute>
  |   <attribute 
name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
  | 
  |   <!-- The 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>
  | 
  |   <!-- Connect to JNDI on the host "localhost" port 1199 -->
  |   <attribute name="Properties">
  |     java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  |     java.naming.factory.url.pkgs=org.jnp.interfaces
  |     java.naming.provider.url=localhost:1199
  |   </attribute>
  | </mbean>
by appending the above to my otherwise unchanged deploy\messaging\jms-ds.xml 
file.

When just starting JBoss, with no application deployed, everything seems happy. 
At least there are no warning or error messages logged. However, when I deploy 
a simple MDB that tries to connect to the remote topic, I get a Exceptions 
culminating in this one:

  | DEPLOYMENTS IN ERROR:
  |   Deployment 
"vfsfile:/C:/tools/jboss/jboss-5.0.1.GA/server/standard/deploy/messaging/jms-ds.xml"
  |       is in error due to the following reason(s): 
java.lang.IllegalStateException:
  |       jboss.messaging:name=JMSProvider,service=JMSProviderLoader is already 
installed.
  | 

I also saw one suggestion to add a tx-connection-factory and so I have also 
appended this to the same jms-ds.xml file:

  | <tx-connection-factory>
  |   <jndi-name>DFMConnectionFactory</jndi-name>
  |   <xa-transaction/>
  |   <rar-name>jms-ra.rar</rar-name>
  |   
<connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
  |   <adapter-display-name>DFM JMS Adapter</adapter-display-name>
  |   <config-property
  |       name="SessionDefaultType"
  |       type="java.lang.String">javax.jms.Topic</config-property>
  |   <config-property
  |       name="JmsProviderAdapterJNDI"
  |       type="java.lang.String">java:/DFMProvider</config-property>
  |   
<security-domain-and-application>JmsXARealm</security-domain-and-application>
  |   </tx-connection-factory>
  | 

I am shooting in the dark at this point as I cannot find any examples or 
documentation that describes how to have both a local and remote provider.

Thanks for your help,

Josh

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233408#4233408

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233408
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to