* 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 ;
}
final CoordinationContextType coordinationContext ;
if (atContext != null)
{
coordinationContext = atContext.getCoordinationContext() ;
}
else if (baContext != null)
{
coordinationContext = baContext.getCoordinationContext() ;
}
else
{
coordinationContext = null ;
}