@Override public synchronized void start() throws HornetQException { if (started) { throw new IllegalStateException("ReplicationManager is already started"); } replicatingChannel.setHandler(responseHandler); failureListener = new ReplicatedSessionFailureListener(); remotingConnection.addFailureListener(failureListener); started = true; enabled = true; }
/** @param liveConnection */ public void addAsFailureListenerOf(CoreRemotingConnection liveConnection) { this.connection = liveConnection; connection.addFailureListener(this); // connection.addCloseListener(this); }