Skip to content

Commit

Permalink
[WFCORE-989] Don't register the server's proxy controller with the HC…
Browse files Browse the repository at this point in the history
… until it is functional
  • Loading branch information
bstansberry committed Sep 20, 2015
1 parent a98541b commit b3fb562
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -276,8 +276,6 @@ public void reconnectServer(final String serverName, final ModelNode domainModel
if(running) {
if(!stopping) {
server.reconnectServerProcess(createBootFactory(serverName, domainModel));
// Register the server proxy at the domain controller
domainController.registerRunningServer(server.getProxyController());
} else {
server.setServerProcessStopping();
}
Expand Down Expand Up @@ -477,6 +475,8 @@ public boolean serverReconnected(String serverProcessName, ManagementChannelHand
serverCommunicationRegistered(serverProcessName, channelHandler);
// Mark the server as started
serverStarted(serverProcessName);
// Register the server proxy at the domain controller
domainController.registerRunningServer(server.getProxyController());
// If the server requires a reload, means we are out of sync
return server.isRequiresReload() == false;
}
Expand Down
Expand Up @@ -268,6 +268,10 @@ public void execute(final OperationContext context, final ModelNode operation) t
// Acquire controller lock
context.acquireControllerLock();
// Check if the server is still in sync with the domain model
// TODO this should involve shipping the resource tree to the server, which then compares
// its local model. This would be done in the prepare phase of a transactional request.
// The ResultHandler of this step would then publish the server's state, and register
// the server's proxy controller with DomainModelControllerService
final byte param;
if(serverInventory.serverReconnected(serverName, channelHandler)) {
param = DomainServerProtocol.PARAM_OK;
Expand Down

0 comments on commit b3fb562

Please sign in to comment.