public ClientShutdownManager(ClientObjectManager objectManager, DistributedObjectClient client, PreparedComponentsFromL2Connection connectionComponents, RejoinManager rejoinManager) { this.client = client; this.rejoinManager = rejoinManager; this.rtxManager = client.getRemoteTransactionManager(); this.channel = client.getChannel(); this.handshakeManager = client.getClientHandshakeManager(); this.connectionComponents = connectionComponents; }
public ClientShutdownManager(ClientObjectManager objectManager, DistributedObjectClient client, PreparedComponentsFromL2Connection connectionComponents, RejoinManager rejoinManager) { this.client = client; this.rejoinManager = rejoinManager; this.rtxManager = client.getRemoteTransactionManager(); this.channel = client.getChannel(); this.handshakeManager = client.getClientHandshakeManager(); this.connectionComponents = connectionComponents; }
public ClientShutdownManager(ClientObjectManager objectManager, DistributedObjectClient client, PreparedComponentsFromL2Connection connectionComponents, RejoinManager rejoinManager) { this.client = client; this.rejoinManager = rejoinManager; this.rtxManager = client.getRemoteTransactionManager(); this.channel = client.getChannel(); this.handshakeManager = client.getClientHandshakeManager(); this.connectionComponents = connectionComponents; }
@Override public void execute() throws Throwable { final AbstractClientFactory clientFactory = AbstractClientFactory.getFactory(); final DistributedObjectClient client = clientFactory.createClient(configHelper, group, classProvider, connectionComponents, dsoCluster, securityManager, abortableOperationManager, rejoinManager, uuid, productId); client.start(); dsoCluster.init(client.getClusterMetaDataManager(), client.getObjectManager(), client.getClusterEventsStage()); dsoCluster.addClusterListener(new ClusterEventListener(client.getRemoteTransactionManager())); dsoCluster.addClusterListener(new DsoClusterErrorListener() { @Override public void nodeError(DsoClusterEvent event) { // TAB-6001: close the channel, connection not allowed and client should not be connected to the server client.getChannel().close(); // this client must be restarted to ever connect back to the cluster so shutdown the rejoinManager rejoinManager.shutdown(); } }); clientRef.set(client); } };