Hi,
In my JTA spec (page 35, May 12 1999), it says that
TransactionManager.getTransaction() returns null if the current thread�s
transaction context
is empty. In the jBoss code, I found the following:
public Transaction getTransaction()
throws SystemException
{
Transaction current = (Transaction)tx.get();
//DEBUG Logger.debug("Current="+current);
if (current == null)
return noTx;
else
return current;
}
May I ask what the advantage of a default noTx transaction is? It makes the
task of detecting an empty context and throwing
an exception quite hard, since noTx isn�t even a public static against which
you could compare something ...
Best,
CGJ