private AtomikosJmsXaSessionProxy ( XASession s , XATransactionalResource jmsTransactionalResource ,
SessionHandleStateChangeListener pooledConnection , SessionHandleStateChangeListener connectionProxy )
{
this.delegate = s;
this.jmsTransactionalResource = jmsTransactionalResource;
this.state = new SessionHandleState ( jmsTransactionalResource , s.getXAResource() );
state.registerSessionHandleStateChangeListener ( pooledConnection );
state.registerSessionHandleStateChangeListener ( connectionProxy );
state.registerSessionHandleStateChangeListener ( this );
//for JMS, session borrowed corresponds to creation of the session
state.notifySessionBorrowed();