SessionDelegate sessDelegate = (SessionDelegate)state.getDelegate();
   public Object handleRollback(Invocation invocation) throws Throwable   {      SessionState state = (SessionState)getState(invocation);            SessionDelegate sessDelegate = (SessionDelegate)state.getDelegate();                     if (!state.isTransacted())      {         throw new IllegalStateException("Cannot rollback a non-transacted session");      }            if (state.isXA())      {         throw new TransactionInProgressException("Cannot call rollback on an XA session");      }            ConnectionState connState = (ConnectionState)state.getParent();            try      {         connState.getResourceManager().rollbackLocal((LocalTxXid)state.getXAResource().getCurrentTxID());      }      finally      {         //Start new local tx         Object xid = connState.getResourceManager().createLocalTx();                  state.getXAResource().setCurrentTxID(xid);      }             //Rollback causes cancellation of messages      String asfConsumerID = state.getAsfConsumerID();            if (log.isTraceEnabled()) { log.trace("Calling sessiondelegate.cancelAllDeliveries()"); }            sessDelegate.cancelDeliveries(asfConsumerID);            return null;               }