[jboss-user] [JBoss Messaging] - Re:

clebert.suconic@jboss.com do-not-reply at jboss.com
Tue Jul 14 18:38:58 EDT 2009


"timfox" wrote : "clebert.suconic at jboss.com" wrote : Take a look at jms-ds.xml
  |   | 
  |   | 
  |   | The JNDI is java:/XAConnectionFactory.
  |   | 
  |   | (You need to use the local JNDI for that... just do new InitialContext(). As you may known java:/ means local VM).
  |   | 
  |   | 
  |   | you can just do:
  |   | 
  |   | 
  |   | InitialContext ctx = new IntialContext();
  |   |   | ConnectionFactory cf = (ConnectionFactory)ctx.lookup("java:/XAConnectionFactory");
  |   |   | 
  |   | 
  |   | 
  | 
  | That is NOT correct.
  | 
  | If you lookup java:/XAConnectionFactory you will NOT be using JCA.
  | 
  | There is a section on using JCA in the docs:
  | 
  | http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/usermanual-2.0.0.beta3/html_single/index.html#d0e5931
  | 
  | 


Yes.. I remember that now...

What confused me was the JMSProviderLoader that still on the jms-ds.xml:


<connection-factories>
  |    <!--
  |     JMS Stuff
  |    -->
  | 
  |    <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>
  |       <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
  |       <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
  |       <attribute name="TopicFactoryRef">java:/XAConnectionFactory</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.messaging.ra.JBMConnectionFactory</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>
  | 

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

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4243617



More information about the jboss-user mailing list