Hi all,

i patterned my spring config to jenck's spring-request-reply-xa.xml.  it
looks like the msg is consumed and produced.  however, when when i forced an
exception in the requestreply bean, it does not seem to rollback the tran as
i can see  q msg count in jmx always to 0.  another method i tried is inject
the bean with org.jencks.JCAConnector and get a reference to transaction
manager to rollback tran.  this one is even stranger because the messages
ended up in DLQ and yet q msg count is still 0.   could anybody help me
please in how to rollback trans.  here's my spring config:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd";>

<beans>
    <bean id="transactionManager"
class="org.jencks.factory.TransactionManagerFactoryBean"/>

    <bean id="jencks" class="org.jencks.JCAContainer">
      <property name="bootstrapContext">
        <bean class="org.jencks.factory.BootstrapContextFactoryBean">
          <property name="transactionManager" ref="transactionManager"/>
          <property name="threadPoolSize" value="25"/>
        </bean>
      </property>
      <property name="resourceAdapter">
        <bean id="activeMQResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter">
          <property name="serverUrl" value="tcp://170.254.98.232:61616"/>       
   
        </bean>
      </property>
    </bean>

    <bean id="inboundConnector" class="org.jencks.JCAConnector">
          <property name="jcaContainer" ref="jencks" />
      <property name="activationSpec">
        <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
          <property name="destination" value="TO.CMS.QUEUE"/>
          <property name="destinationType" value="javax.jms.Queue"/>
        </bean>
      </property>
      <property name="transactionManager" ref="transactionManager"/>
      <property name="ref" value="pooledMsgListener"/>
    </bean>

    <!-- a pooled, non-thread safe MessageListener using ProxyFactoryBean
-->
    <bean id="pooledMsgListener"
class="org.jencks.TargetSourceMessageListener">
      <property name="targetSource">
        <bean id="pooledMsgListenerTargetSource"
class="org.springframework.aop.target.CommonsPoolTargetSource">
          <property name="targetBeanName" value="msgListener"/>
          <property name="maxSize" value="25"/>
        </bean>
      </property>
    </bean>  

    <bean id="msgListener" class="com.hmacorpmis.msglistener.MsgListener"
scope="prototype">
        <property name="template" ref="jmsTemplate"/>
        <property name="destination" ref="replyQueue"/>
        <property name="inboundConnector" ref="inboundConnector"/>
    </bean>    

    <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
      <property name="connectionFactory">
            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
          <property name="brokerURL" value="tcp://170.254.98.232:61616"/>       
      
            </bean>
      </property>
    </bean>    

    <bean id="replyQueue" class="org.apache.activemq.command.ActiveMQQueue">
        <constructor-arg value="FROM.CMS.QUEUE"/>
    </bean>
</beans>

Erwin Pader
Health Management Associates, Inc.
-- 
View this message in context: 
http://www.nabble.com/how-to-code-tran-rollback-in-a-requestreply-bean-tf2754544.html#a7680761
Sent from the jencks - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to