[jboss-user] [JBoss Messaging] - Re: Poss solution frequent deadlocks on SQLServer

timfox do-not-reply at jboss.com
Wed Nov 14 05:47:15 EST 2007


"JeremyStone" wrote :  However the problem with this is that messages seem to be getting acknowleged in spite of failure (setRollbackOnly called) and no redelivery is occurring. 
  | 
  | Looking at the JBoss Messaging source, SessionAspect.handlePostDeliver() calls isXAAndConsideredNonTransacted() which returns true because the SessionState's treatAsNonTransactedWhenNotEnlisted is set to true.
  | 
  | Is the solution to somehow to set treatAsNonTransactedWhenNotEnlisted to false? What does an MDB container do here?

Yes, this is probably because Spring isn't enlisting the session in the JTA transaction until after it has received the message from JBM using a message listener.

Either that or there is a small period of time between Spring delisting the session from the JTA tx before commit and enlisting it in the next one, when a message can be received but the session is not enlisted. The session is therefore not transacted at that point so acts as auto_ack and acks immediately.


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

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



More information about the jboss-user mailing list