|
From: Christopher G. S. I. <cg...@ld...> - 2007-01-16 13:35:54
|
Christopher G. Stach II wrote:
> We have Jencks 2.0, AMQ 4.1.0, and Spring 2.0.2 driving MD POJOs out of
> a JCA pool in Resin. We need to do this because Resin is the TM and
> supplies the DB pooling. For the most part, it works. We've always had
> issues with XA transactions in this configuration, but one of them was
> _hopefully_ fixed in Jencks 2.0 with the XAEndpoint changes. Here's the
> scoop:
>
> * Hibernate flush generates a rollback from a deadlock at
> SpringSessionSynchronization:126
> * AbstractPlatformTransactionManager:682 attempts to start a rollback
> from the thrown RuntimeException
> * AbstractPlatformTransactionManager:791 skips the UserTransaction
> rollback (JtaTransactionManager:794) at
> AbstractPlatformTransactionManager:795 because Spring originally got a
> transaction from Resin and it was marked as "not new"
> (AbstractPlatformTransactionManager:327 until 441, we use Required)
> * Things run until XAEndpoint:101, which branches to the commit at 105
> because only the Spring transaction was marked for rollback, not the
> real one
>
> Should Jencks be cooperating more with Spring's
> PlatformTransactionManager, or what? This is causing rollbacks to turn
> into commits, and that's pretty annoying. :)
Here's the relevant portion of the stack trace:
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at
org.springframework.orm.hibernate3.SpringSessionSynchronization.beforeCommit(SpringSessionSynchronization.java:126)
at
org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:48)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:821)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:637)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:624)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:307)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at
com.xxx.interceptor.XxxInterceptor.invoke(DistributingInterceptor.java:152)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
at $Proxy70.runMethods(Unknown Source)
at sun.reflect.GeneratedMethodAccessor751.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:270)
at
com.xxx.jms.JmsMessageListenerService.onMessage(JmsMessageListenerService.java:124)
at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:129)
at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121)
at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:695)
at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
at com.caucho.jca.WorkThread.run(WorkThread.java:99)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
at java.lang.Thread.run(Thread.java:619)
--
Christopher G. Stach II
|