public boolean canBeRecycledForCallingThread()
{
boolean ret = false;
Reapable handle = getCurrentConnectionProxy();
if ( handle != null ) {
CompositeTransactionManager ctm = Configuration
.getCompositeTransactionManager ();
CompositeTransaction ct = null;
if ( ctm != null ) ct = ctm.getCompositeTransaction ();
if ( ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
DynamicProxy dproxy = ( DynamicProxy ) handle;
AtomikosThreadLocalConnection previous = (AtomikosThreadLocalConnection) dproxy.getInvocationHandler();
ret = previous.isInTransaction ( ct );
}