some fixes

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/resource-registry-handlers@146644 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-04-06 13:05:03 +00:00
parent 3bc5e7b9df
commit 3407a40547
2 changed files with 4 additions and 0 deletions

View File

@ -316,6 +316,9 @@ public class EServiceManager extends ApplicationLifecycleHandler {
} catch (ResourceAlreadyPresentException e) {
ResourceRegistryClient registryClient = ResourceRegistryClientFactory.create();
eService = registryClient.getInstance(EService.class, eService.getHeader().getUUID());
String state = applicationContext.lifecycle().state().remoteForm().toLowerCase();
logger.debug("Moving app {} to {}", applicationContext.name(), state);
createOrUpdateServiceStateFacet(eService, state);
} catch (ResourceAvailableInAnotherContextException e) {
// Adding the HostingNode I also add the EService thanks to propagationConstraint
addHostingNodeToCurrentContext();

View File

@ -290,6 +290,7 @@ public class HostingNodeManager extends ContainerHandler {
hostingNode = registryClient.getInstance(
HostingNode.class, hostingNode.getHeader()
.getUUID());
updateHostingNode(hostingNode);
} catch (ResourceAvailableInAnotherContextException e) {
addToContext(hostingNode, token);
}