After studying the previous implementation of UserTransaction for BMT
session beans I have eliminated it in favor of the standalone
implementation.

If, after reading the explanation below, anyone knows of a reason this
might not work, please speak up.

The only function I could see to the session bean specific implementation
was to clear the context's transaction when the user transaction was ended.
 This transaction variable is used to re-enroll BMT stateful session beans
in the correct transaction when a tx is started in one  method call and
ended in another.  On the way out from the first method call the tx is
stored in the ctx and on the way in the tx is resumed.

There was a comment to the effect that the tx needed to be cleared so that
later calls wouldn't try to enroll in an ended transaction.

I have replaced this code by code that always sets the context's
transaction to the current transaction: if the transactio has ended this is
null.

AFAIK the only possible difference in behavior between the previous code
and my replacement would be if the session bean could call itself between
ending the transaction and returning.  However, session beans are
non-reentrant so this cannot happen.

I also replaced the somewhat complicated code to supply the correct
context's UserTransaction when java:/comp/env/UserTransaction is looked up
with a simple linkref to the global UserTransaction.

Again, if anyone sees any problem with this please speak up.

Thanks
david jencks


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to