I'm reposting this from the LogicBlaze forum...

I havent been able to get transactions to rollback and retry properly using
this combination of technologies. Below is the pertinent spring
configuration:

Code:

        <bean id="jencks" class="org.jencks.JCAContainer">
                <property name="bootstrapContext">
                        <bean 
class="org.jencks.factory.BootstrapContextFactoryBean">
                                <property name="threadPoolSize" value="25" />
                        </bean>
                </property>
                <property name="resourceAdapter" ref="resourceAdapter" />
        </bean>
 
        <bean id="resourceAdapter"
class="org.activemq.ra.ActiveMQResourceAdapter">
                <property name="serverUrl" value="tcp://localhost:61616" />
        </bean>
 
        <bean id="transactionMdb" class="org.jencks.JCAConnector">
                <property name="jcaContainer" ref="jencks" />
                <property name="activationSpec">
                        <bean class="org.activemq.ra.ActiveMQActivationSpec">
                                <property name="destination" 
value="transactionQueue" />
                                <property name="destinationType" 
value="javax.jms.Queue" />
                                <property name="resourceAdapter" 
ref="resourceAdapter" />
                        </bean>
                </property>
                <property name="ref" value="consumer" />
                <property name="transactionManager" ref="userTransaction" />
                <property name="resourceAdapter" ref="resourceAdapter" />
        </bean>
 
        <bean id="consumer" class="com.test.Consumer"/>
 
 
        <bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean" />
        <bean id="userTransaction"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
        <bean id="jtaTransactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
                <property name="userTransaction" ref="userTransaction" />
        </bean>
 
        <bean id="jmsFactory" class="org.activemq.pool.PooledConnectionFactory">
                <property name="connectionFactory">
                        <bean class="org.activemq.ActiveMQConnectionFactory">
                                <property name="brokerURL" 
value="tcp://localhost:61616" />
                        </bean>
                </property>
        </bean>
 
        <bean id="transactionJmsTemplate"
class="org.springframework.jms.core.JmsTemplate">
                <property name="connectionFactory" ref="jmsFactory"/>
                <property name="defaultDestinationName" 
value="transactionQueue" />
                <property name="deliveryPersistent" value="true" />
        </bean>
 



I am throwing a RuntimeException in the onMessage() method of the POJO MDB
if a rollback should occur. The following is in the logs:

Code:

 [DEBUG] 2006-03-22 12:05:11,810  - org.activemq.ra.ServerSessionImpl:0
(ServerSessionImpl.java:169)- Endpoint failed to process message.
 java.lang.RuntimeException: Endpoint before delivery notification failure
        at
org.activemq.ra.ServerSessionImpl.beforeDelivery(ServerSessionImpl.java:203)
        at org.activemq.ActiveMQSession.run(ActiveMQSession.java:549)
        at org.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Thread.java:595)
 Caused by: org.activemq.ra.InvalidMessageEndpointException
        at
org.activemq.ra.MessageEndpointProxy$MessageEndpointDead.beforeDelivery(MessageEndpointProxy.java:182)
        at
org.activemq.ra.MessageEndpointProxy.beforeDelivery(MessageEndpointProxy.java:70)
        at
org.activemq.ra.ServerSessionImpl.beforeDelivery(ServerSessionImpl.java:201)
        ... 5 more
 



is there an issue with my spring configuration? Thanks for any help
--
View this message in context: 
http://www.nabble.com/AMQ-3.2-Spring-Jencks-POJO-and-XA-Transactions-t1337311.html#a3574167
Sent from the ActiveMQ - User forum at Nabble.com.

Reply via email to