if (transport instanceof ConnectionOrientedTransportMapping) {
ConnectionOrientedTransportMapping cotm =
(ConnectionOrientedTransportMapping)transport;
cotm.addTransportStateListener(this);
cotm.setConnectionTimeout(0);
cotm.setMessageLengthDecoder(new AgentXProtocol());
}
}