I'm looking at TxConnectionManager::getManagedConnection().
Shouldn't there always be a check against if an active transaction exists ?
Currently we have:
| Transaction tx = tm.getTransaction();
| if (tx != null && TxUtils.isActive(tx) == false)
| throw new ResourceException("...");
|
But in case of a transaction hasn't been started tm.getTransaction() will return
null.
So code should read:
| Transaction tx = tm.getTransaction();
| if (tx == null || TxUtils.isActive(tx) == false)
| throw new ResourceException("...");
|
The transaction will only be passed to BaseConnectionManager2 if track-by-tx is enabled in
any case.
TxConnectionManager::checkTransactionActive() also doesn't check for a null value -
the JavaDoc states that a RollbackException should be thrown if the transaction is not
active.
Or am I overlooking something ?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170548#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...