private boolean enlist() throws AtomikosSQLException {
boolean ret = false;
try {
if ( Configuration.isDebugLoggingEnabled() ) Configuration.logDebug( this + ": notifyBeforeUse " + sessionHandleState);
CompositeTransaction ct = null;
CompositeTransactionManager ctm = getCompositeTransactionManager();
if ( ctm != null ) {
ct = ctm.getCompositeTransaction();
//first notify the session handle - see case 27857
sessionHandleState.notifyBeforeUse ( ct , hmsg );
if (ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
ret = true;
if ( Configuration.isDebugLoggingEnabled() ) Configuration.logDebug ( this + ": detected transaction " + ct );