Fixed serviceStateFacet management
This commit is contained in:
parent
591ccc645a
commit
de30ff5988
|
@ -188,7 +188,7 @@ public class EServiceManager {
|
|||
|
||||
return eService;
|
||||
}
|
||||
|
||||
|
||||
public EService createEService() throws ResourceRegistryException {
|
||||
ResourceRegistryClient resourceRegistryClient = ResourceRegistryClientFactory.create();
|
||||
UUID eServiceUUID = UUID.fromString(applicationContext.id());
|
||||
|
@ -208,7 +208,7 @@ public class EServiceManager {
|
|||
} catch (NotFoundException e) {
|
||||
eService = instantiateEService();
|
||||
createActivatesRelation(eService);
|
||||
|
||||
serviceStateFacet = eService.getFacets(ServiceStateFacet.class).get(0);
|
||||
} catch (AvailableInAnotherContextException e) {
|
||||
addToContext();
|
||||
try {
|
||||
|
@ -256,6 +256,7 @@ public class EServiceManager {
|
|||
|
||||
try {
|
||||
activates = resourceRegistryPublisher.createIsRelatedTo(activates);
|
||||
this.eService = activates.getTarget();
|
||||
} catch (NotFoundException e) {
|
||||
logger.error("THIS IS REALLY STRANGE. YOU SHOULD NE BE HERE. Error while creating {}.", activates, e);
|
||||
throw e;
|
||||
|
|
Loading…
Reference in New Issue