[
http://jira.jboss.com/jira/browse/JBAS-3631?page=all ]
Weston Price resolved JBAS-3631.
--------------------------------
Resolution: Done
Added transation branch to StdServerSession txn managment in onMessage.
Missing branch in StdServerSession commit logic
-----------------------------------------------
Key: JBAS-3631
URL:
http://jira.jboss.com/jira/browse/JBAS-3631
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JMS service
Affects Versions: JBossAS-4.0.5.CR1
Reporter: Adrian Brock
Assigned To: Weston Price
Fix For: JBossAS-4.0.5.GA
There is a missing branch in the StdServerSession commit logic.
In the case where the transaction manager rollsback the transaction early,
e.g. JBossTM does this for transaction timeouts, the status will be NO_TRANSACTION
(or a heuristic state).
The code:
// Marked rollback
if (trans.getStatus() == Status.STATUS_MARKED_ROLLBACK)
{
if (trace)
log.trace(StdServerSession.this + " rolling back JMS
transaction tx=" + trans);
// actually roll it back
tm.rollback();
// NO XASession? then manually rollback.
// This is not so good but
// it's the best we can do if we have no XASession.
if (xaSession == null && serverSessionPool.isTransacted())
{
session.rollback();
}
}
else if (trans.getStatus() == Status.STATUS_ACTIVE)
{
// Commit tx
// This will happen if
// a) everything goes well
// b) app. exception was thrown
if (trace)
log.trace(StdServerSession.this + " commiting the JMS
transaction tx=" + trans);
tm.commit();
// NO XASession? then manually commit. This is not so good but
// it's the best we can do if we have no XASession.
if (xaSession == null && serverSessionPool.isTransacted())
{
session.commit();
}
}
needs an extra branch:
else
{
if (trace)
log.trace(StdServerSession.this + " transaction already ended
tx=" + trans);
// spend the thread association
tm.suspend();
// NO XASession? then manually rollback.
// This is not so good but
// it's the best we can do if we have no XASession.
if (xaSession == null && serverSessionPool.isTransacted())
{
session.rollback();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira