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 if either inactive in this tx, OR if active (since a new session will be created anyway, and
//concurrent sessions are allowed on the same underlying connection!