// we "cripple" the remoting connection by removing ConnectionListener. This way, failures
// cannot be "cleanly" detected by the client-side pinger, and we'll fail on an invocation
JMSRemotingConnection rc = ((ClientConnectionDelegate)((JBossConnection)conn).
getDelegate()).getRemotingConnection();
rc.removeConnectionListener();
// poison the server
ServerManagement.poisonTheServer(1, typeOfFailure);
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);