public boolean canBeRecycledForCallingThread ()
{
boolean ret = false;
if ( currentProxy != null ) {
CompositeTransactionManager tm = Configuration.getCompositeTransactionManager();
CompositeTransaction current = tm.getCompositeTransaction();
if ( ( current != null ) && ( current.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME) != null )) {
DynamicProxy dproxy = ( DynamicProxy ) currentProxy;
AtomikosJmsConnectionProxy proxy = (AtomikosJmsConnectionProxy) dproxy.getInvocationHandler();
//recycle only if inactive in this tx - i.e., if proxy was closed!
ret = proxy.isInactiveInTransaction(current);