Hi!

marc fleury wrote:
> Resume and suspend are used to resume and suspend the "Transaction" as in
> "suspend this transaction".
> We need to resume and suspend the association of the Thread to the
> transaction (under JOnAS this was clear, they knew transactions, it was
> getPropagationContext and setPropagationContext).

Still unclear about the difference, since the JTA docs say on suspend():
"Suspend the transaction currently associated with the calling thread
and return a Transaction object that
     represents the transaction context being suspended. If the calling
thread is not associated with a
     transaction, the method returns a null object reference. When this
method returns, the calling thread is
     associated with no transaction."
and on resume():
"Resume the transaction context association of the calling thread with
the transaction represented by the
     supplied Transaction object. When this method returns, the calling
thread is associated with the transaction
     context specified."

What would be the difference between suspend/resume and
setPropagationContext/getPropagationContext? Also, since the transaction
is literally moving to another execution thread during the call I think
it would be appropriate to use suspend on send and resume on return
since otherwise the same transaction will be associated with several
execution threads at once.

/Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com

Reply via email to