initializeLocal();
}
private synchronized void initializeRemote() throws JMSException {
if (remoteConnection == null) {
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(remoteUserName, remotePassword, uri);
factory.setTurboBoost(true);
factory.setJ2EEcompliant(false);
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);