/*
* There should either be an Atomic Transaction *or* a Business Activity
* associated with the thread.
*/
final TransactionManager transactionManager = TransactionManagerFactory.transactionManager() ;
final BusinessActivityManager businessActivityManager = BusinessActivityManagerFactory.businessActivityManager() ;
final Context atContext ;
if (transactionManager != null)
{
final com.arjuna.mwlabs.wst.at.context.TxContextImple txContext =
(com.arjuna.mwlabs.wst.at.context.TxContextImple)transactionManager.currentTransaction() ;
atContext = (txContext == null ? null : txContext.context()) ;
}
else
{
atContext = null ;
}
final Context baContext ;
if (businessActivityManager != null)
{
final com.arjuna.mwlabs.wst.ba.context.TxContextImple txContext =
(com.arjuna.mwlabs.wst.ba.context.TxContextImple)businessActivityManager.currentTransaction() ;
baContext = (txContext == null ? null : txContext.context()) ;
}
else
{
baContext = null ;