factory.setQuickClose(true);
factory.setInternalConnection(true);
remoteConnection = (ActiveMQConnection) factory.createConnection();
TransportChannel transportChannel = remoteConnection.getTransportChannel();
if (transportChannel instanceof CompositeTransportChannel) {
CompositeTransportChannel composite = (CompositeTransportChannel) transportChannel;
composite.setMaximumRetries(maximumRetries);
composite.setFailureSleepTime(reconnectSleepTime);
composite.setIncrementTimeout(false);
}
transportChannel.addTransportStatusEventListener(this);
remoteConnection.setClientID(brokerContainer.getBroker().getBrokerName() + "_NetworkChannel");
remoteConnection.start();
BrokerInfo info = new BrokerInfo();