[jboss-user] [Messaging, JMS & JBossMQ] - Re: XA Recovery of messages sent to a Topic

mmusgrov do-not-reply at jboss.com
Mon Apr 28 15:49:17 EDT 2008

The remaining issue, then, is to do with how the JBossMQ XAResource handles non-durable subscriptions:

If there are durable subscriptions for a topic then published messgages are put on a peristent queue otherwise a temporary queue is used (see method JMSTopic.addMessage(...)). It appears that only messages put on a peristent queue are recoverable.

However, all messages are associated with the transaction (see SpyXAResourceManager.addMessage(...)) and the SpyXAResourceManager.prepare(...) method will only return XAResource.XA_RDONLYif there are no messages associated with the transaction (see TXState.isReadOnly()). The correct behaviour should be to check if there are any messages on any persistent queues associated with the transaction when determining whether this particular transaction branch is read only.

This is a problem for TM recovery since the XAResource a for temporary topic queue does not return XAResource.XA_RDONLY for the prepare phase. Thus when the TM calls recover on the resource no xids are returned and hence the transaction can never be recovered.

Could anyone hazzard a guess as to how much effort would be involved in resolving this issue.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147348#4147348

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147348

More information about the jboss-user mailing list