Hi,

resending with subject changed.

I am able to get things to work without global transaction.  With JBOSS I am
getting "javax.jms.JMSException: Session's XAResource has not been enlisted
in a distributed transaction."

using the spring config as below:
=========================
<bean id="myMessageListener" class="jmsexample.ExampleListener" />
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
      <props>
        <prop key="java.naming.factory.initial">
          org.apache.activemq.jndi.ActiveMQInitialContextFactory
        </prop>
        <prop key="queue.TEST.Q1">
          TEST.Q1
        </prop>
      </props>
    </property>
  </bean>
 <bean id="appJmsDestination"
    class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiTemplate">
      <ref bean="jndiTemplate"/>
    </property>
    <property name="jndiName" value="TEST.Q1"/>
  </bean>
<bean id="connectionFactory"
      class="org.apache.activemq.ActiveMQXAConnectionFactory">
        <property name="brokerURL">
           <value>tcp://localhost:61616</value>
        </property>
    </bean>


<bean id="jmsContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="destination" ref="appJmsDestination"/>
    <property name="messageListener" ref="myMessageListener" />
    
     
    <property name="transactionManager" ref="transactionManager"/>
    
</bean>

 
 <bean id="jbossTransactionManager"
   
class="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple">
  </bean>

  <bean id="jbossUserTransaction"
   
class="com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple"/>

  <bean id="transactionManager"
    class="org.springframework.transaction.jta.JtaTransactionManager">
    <property name="transactionManager">
      <ref bean="jbossTransactionManager" />
    </property>
    <property name="userTransaction">
      <ref bean="jbossUserTransaction" />
    </property>
  </bean>


Regards,

Miten.
-- 
View this message in context: 
http://old.nabble.com/physical-queue-cannot-be-resolved-using-jndi---spring-tp26478123p26491440.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to