[
https://issues.apache.org/activemq/browse/AMQ-731?page=comments#action_36228 ]
Christopher G. Stach II commented on AMQ-731:
---------------------------------------------
Okay, this is the stack trace with a breakpoint put at TransactionContext line
560. It happens over and over and over, each time the transaction is suspended.
Thread [resin-30] (Suspended (breakpoint at line 560 in TransactionContext))
TransactionContext.setXid(Xid) line: 560
TransactionContext.end(Xid, int) line: 327
LocalAndXATransaction.end(Xid, int) line: 89
WrapperNamedXAResource.end(Xid, int) line: 51
TransactionImpl.suspend() line: 448
TransactionManagerImpl.suspend() line: 201
TreeCache.suspend() line: 101
TreeCache.put(Object, Object) line: 71
UpdateTimestampsCache.preinvalidate(Serializable[]) line: 54
ActionQueue.execute(Executable) line: 244
DefaultSaveOrUpdateEventListener(AbstractSaveEventListener).performSaveOrReplicate(Object,
EntityKey, EntityPersister, boolean, Object, EventSource, boolean) line: 290
DefaultSaveOrUpdateEventListener(AbstractSaveEventListener).performSave(Object,
Serializable, EntityPersister, boolean, Object, EventSource, boolean) line: 180
DefaultSaveOrUpdateEventListener(AbstractSaveEventListener).saveWithGeneratedId(Object,
String, Object, EventSource, boolean) line: 108
DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(SaveOrUpdateEvent)
line: 186
DefaultSaveOrUpdateEventListener.entityIsTransient(SaveOrUpdateEvent)
line: 175
DefaultSaveOrUpdateEventListener.performSaveOrUpdate(SaveOrUpdateEvent)
line: 98
DefaultSaveOrUpdateEventListener.onSaveOrUpdate(SaveOrUpdateEvent)
line: 70
SessionImpl.fireSaveOrUpdate(SaveOrUpdateEvent) line: 509
SessionImpl.saveOrUpdate(String, Object) line: 501
SessionImpl.saveOrUpdate(Object) line: 497
HibernateTemplate$18.doInHibernate(Session) line: 693
HibernateTemplate.execute(HibernateCallback, boolean) line: 366
HibernateTemplate.saveOrUpdate(Object) line: 690
LeadDAOImpl(AbstractDAOImpl<E>).saveOrUpdate(E) line: 281
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
AopUtils.invokeJoinpointUsingReflection(Object, Method, Object[]) line:
287
ReflectiveMethodInvocation.invokeJoinpoint() line: 181
ReflectiveMethodInvocation.proceed() line: 148
TransactionInterceptor.invoke(MethodInvocation) line: 96
ReflectiveMethodInvocation.proceed() line: 170
JdkDynamicAopProxy.invoke(Object, Method, Object[]) line: 176
$Proxy46.saveOrUpdate(Object) line: not available
RefinanceLeadImpl(LeadImpl).save() line: 545
ProcessorImpl.processLead(DistributionContext, Lead) line: 126
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
AopUtils.invokeJoinpointUsingReflection(Object, Method, Object[]) line:
287
ReflectiveMethodInvocation.invokeJoinpoint() line: 181
ReflectiveMethodInvocation.proceed() line: 148
TransactionInterceptor.invoke(MethodInvocation) line: 96
ReflectiveMethodInvocation.proceed() line: 170
JdkDynamicAopProxy.invoke(Object, Method, Object[]) line: 176
$Proxy74.processLead(DistributionContext, Lead) line: not available
ProcessorFacadeImpl$1.run() line: 92
ProcessorFacadeImpl(DistributionContextWrapper).wrap(DistributionContextWrapper$DistributionContextRunnable)
line: 124
ProcessorFacadeImpl.processLead(Lead) line: 89
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
AopUtils.invokeJoinpointUsingReflection(Object, Method, Object[]) line:
287
ReflectiveMethodInvocation.invokeJoinpoint() line: 181
ReflectiveMethodInvocation.proceed() line: 148
TransactionInterceptor.invoke(MethodInvocation) line: 96
ReflectiveMethodInvocation.proceed() line: 170
JdkDynamicAopProxy.invoke(Object, Method, Object[]) line: 176
$Proxy75.processLead(Lead) line: not available
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
AopUtils.invokeJoinpointUsingReflection(Object, Method, Object[]) line:
287
ReflectiveMethodInvocation.invokeJoinpoint() line: 181
ReflectiveMethodInvocation.proceed() line: 148
RemoteInvocationTraceInterceptor.invoke(MethodInvocation) line: 68
ReflectiveMethodInvocation.proceed() line: 170
JdkDynamicAopProxy.invoke(Object, Method, Object[]) line: 176
$Proxy0.processLead(Lead) line: not available
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
LingoInvocation(RemoteInvocation).invoke(Object) line: 179
DefaultRemoteInvocationExecutor.invoke(RemoteInvocation, Object) line:
33
JmsServiceExporterMessageListener(RemoteInvocationBasedExporter).invoke(RemoteInvocation,
Object) line: 76
JmsServiceExporterMessageListener(RemoteInvocationBasedExporter).invokeAndCreateResult(RemoteInvocation,
Object) line: 112
JmsServiceExporterMessageListener(JmsServiceExporterSupport).onMessage(Message)
line: 85
XAEndpoint.onMessage(Message) line: 126
MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy,
Message) line: 120
MessageEndpointProxy.onMessage(Message) line: 60
ActiveMQSession.run() line: 692
ServerSessionImpl.run() line: 163
WorkThread.run() line: 99
ThreadPool.runTasks() line: 490
ThreadPool.run() line: 423
Thread.run() line: 595
> Redeliveries don't work with resource adapter and Jencks
> --------------------------------------------------------
>
> Key: AMQ-731
> URL: https://issues.apache.org/activemq/browse/AMQ-731
> Project: ActiveMQ
> Type: Bug
> Components: Connector
> Versions: 4.0
> Environment: Sun JDK 1.5.0_06, Jencks 1.1.3, AMQ 4.0, Resin Pro 3.0.14
> Reporter: Christopher G. Stach II
>
>
> During a rollback in a JTA transaction, this exception is generated a few
> times:
> org.apache.activemq.broker.AbstractConnection.serviceException Async
> error occurred: javax.jms.JMSException: Could not correlate
> acknowledgment with dispatched message: MessageAck {commandId = 137,
> responseRequired = false, ackType = 1, consumerId =
> ID:xxx-2276-1148335783189-2:5:-1:2, firstMessageId =
> ID:xxx-2276-1148335783189-2:1:1:1:2, lastMessageId =
> ID:xxx-2276-1148335783189-2:1:1:1:2, destination = queue://xxxQueue,
> transactionId = null, messageCount = 1}
> javax.jms.JMSException: Could not correlate acknowledgment with
> dispatched message: MessageAck {commandId = 137, responseRequired =
> false, ackType = 1, consumerId = ID:xxx-2276-1148335783189-2:5:-1:2,
> firstMessageId = ID:xxx-2276-1148335783189-2:1:1:1:2, lastMessageId =
> ID:xxx-2276-1148335783189-2:1:1:1:2, destination = queue://xxxQueue,
> transactionId = null, messageCount = 1}
> at
> org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:175)
> at
> org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:233)
> at
> org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:362)
> at
> org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:176)
> at
> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:65)
> at
> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:65)
> at
> org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:78)
> at
> org.apache.activemq.broker.AbstractConnection.processMessageAck(AbstractConnection.java:356)
> at org.apache.activemq.command.MessageAck.visit(MessageAck.java:178)
> at
> org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
> at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
> at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
> at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
> at
> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:76)
> at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
> at
> org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
> at
> org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1111)
> at
> org.apache.activemq.ActiveMQSession.asyncSendPacket(ActiveMQSession.java:1655)
> at
> org.apache.activemq.ActiveMQSession$2.afterRollback(ActiveMQSession.java:720)
> at
> org.apache.activemq.TransactionContext.afterRollback(TransactionContext.java:134)
> at
> org.apache.activemq.TransactionContext.rollback(TransactionContext.java:409)
> at
> org.apache.activemq.ra.LocalAndXATransaction.rollback(LocalAndXATransaction.java:126)
> at
> org.apache.geronimo.transaction.manager.WrapperNamedXAResource.rollback(WrapperNamedXAResource.java:78)
> at
> com.caucho.transaction.TransactionImpl.rollbackInt(TransactionImpl.java:787)
> at
> com.caucho.transaction.TransactionImpl.commit(TransactionImpl.java:560)
> at org.jencks.XAEndpoint.afterDelivery(XAEndpoint.java:103)
> at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.afterDelivery(MessageEndpointProxy.java:125)
> at
> org.apache.activemq.ra.MessageEndpointProxy.afterDelivery(MessageEndpointProxy.java:64)
> at
> org.apache.activemq.ra.ServerSessionImpl.afterDelivery(ServerSessionImpl.java:214)
> at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:751)
> at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> at com.caucho.jca.WorkThread.run(WorkThread.java:99)
> at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
> at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
> at java.lang.Thread.run(Thread.java:595)
> Note that the ackType is a poison ack. This shouldn't be the case as the
> configuration (below) on the resource adapter and the managed connection
> factory both specify 9 redeliveries. Redelivery does not happen.
> Broker configuration:
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://activemq.org/config/1.0">
> <broker persistent="false" useJmx="false">
> <transportConnectors>
> <transportConnector uri="vm://localhost" />
> </transportConnectors>
> <persistenceAdapter>
> <memoryPersistenceAdapter />
> </persistenceAdapter>
> </broker>
> </beans>
> Spring configuration:
> <bean id="jms.connectionFactory"
> class="org.springframework.jca.support.LocalConnectionFactoryBean">
> <property name="connectionManager">
> <bean
> class="com.xxx.jca.ResinConnectionManagerFactoryBean">
> <property name="localTransaction">
> <value>false</value>
> </property>
> <property name="localTransactionOptimization">
> <value>false</value>
> </property>
> <property name="managedConnectionFactory">
> <ref
> local="jms.managedConnectionFactory" />
> </property>
> <property name="xaTransaction">
> <value>true</value>
> </property>
> </bean>
> </property>
> <property name="managedConnectionFactory">
> <ref local="jms.managedConnectionFactory" />
> </property>
> </bean>
> <bean id="jms.jcaContainer" class="org.jencks.JCAContainer">
> <property name="bootstrapContext">
> <bean
> class="com.xxx.jca.ResinBootstrapContextFactoryBean" />
> </property>
> <property name="resourceAdapter">
> <ref local="jms.resourceAdapter" />
> </property>
> </bean>
> <bean id="jms.managedConnectionFactory"
> class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
> <property name="allPrefetchValues">
> <value>1</value>
> </property>
> <property name="initialRedeliveryDelay">
> <value>2000</value>
> </property>
> <property name="maximumRedeliveries">
> <value>9</value>
> </property>
> <property name="redeliveryBackOffMultiplier">
> <value>2</value>
> </property>
> <property name="redeliveryUseExponentialBackOff">
> <value>true</value>
> </property>
> <property name="resourceAdapter">
> <ref local="jms.resourceAdapter" />
> </property>
> </bean>
> <bean id="jms.broker"
> class="org.apache.activemq.xbean.BrokerFactoryBean">
> <property name="config">
> <value>classpath:activemq.xml</value>
> </property>
> <property name="start">
> <value>true</value>
> </property>
> </bean>
> <bean id="jms.resourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter"
> depends-on="jms.broker">
> <property name="allPrefetchValues">
> <value>1</value>
> </property>
> <property name="initialRedeliveryDelay">
> <value>2000</value>
> </property>
> <property name="maximumRedeliveries">
> <value>9</value>
> </property>
> <property name="redeliveryBackOffMultiplier">
> <value>2</value>
> </property>
> <property name="redeliveryUseExponentialBackOff">
> <value>true</value>
> </property>
> <property name="serverUrl">
> <value>vm://localhost</value>
> </property>
> </bean>
> I have written a test case using Geronimo's TM, but it succeeds. The
> configuration is very different, so I don't think it can be attributed to
> just a simple change in TM. A lot of other configuration changes had to be
> made.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira