Merge branch 'master' of gitea@code-repo.d4science.org:gCubeSystem/resource-registry-handlers.git
This commit is contained in:
commit
11f442523a
15
pom.xml
15
pom.xml
|
@ -16,7 +16,6 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
||||
<serviceClass>Common</serviceClass>
|
||||
</properties>
|
||||
|
||||
<scm>
|
||||
|
@ -81,18 +80,4 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-uberjar</id>
|
||||
<phase>install</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -84,4 +84,9 @@ public class ContextUtility {
|
|||
return contextsUUID;
|
||||
}
|
||||
|
||||
public static String getContextNameFromUUID(UUID contextUUID) throws ResourceRegistryException {
|
||||
ContextCache contextCache = ContextCache.getInstance();
|
||||
return contextCache.getContextFullNameByUUID(contextUUID);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -147,9 +147,9 @@ public class EServiceManager {
|
|||
UUID uuid = UUID.fromString(applicationContext.container().id());
|
||||
try {
|
||||
resourceRegistryPublisher.addToContext(HostingNode.NAME, uuid, contextUUID, false);
|
||||
logger.info("{} with UUID {} successfully added to context ({})", HostingNode.NAME, uuid, ContextUtility.getCurrentContextName());
|
||||
logger.info("{} with UUID {} successfully added to context ({})", HostingNode.NAME, uuid, ContextUtility.getContextNameFromUUID(contextUUID));
|
||||
} catch (Exception e) {
|
||||
logger.error("Unable to add {} with UUID {} to context ({})", HostingNode.NAME, uuid, ContextUtility.getCurrentContextName(), e);
|
||||
logger.error("Unable to add {} with UUID {} to context ({})", HostingNode.NAME, uuid, ContextUtility.getContextNameFromUUID(contextUUID), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ public class EServiceManager {
|
|||
|
||||
public void removeFromContext(UUID contextUUID)
|
||||
throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||
String contextFullName = ContextCache.getInstance().getContextFullNameByUUID(contextUUID);
|
||||
String contextFullName = ContextUtility.getContextNameFromUUID(contextUUID);
|
||||
UUID uuid = UUID.fromString(applicationContext.container().id());
|
||||
try {
|
||||
resourceRegistryPublisher.removeResourceFromContext(HostingNode.NAME, uuid, contextUUID, false);
|
||||
|
|
|
@ -145,9 +145,9 @@ public class HostingNodeManager {
|
|||
UUID uuid = UUID.fromString(containerContext.id());
|
||||
try {
|
||||
resourceRegistryPublisher.addToContext(HostingNode.NAME, uuid, contextUUID, false);
|
||||
logger.info("{} with UUID {} successfully added to context ({})", HostingNode.NAME, uuid, ContextUtility.getCurrentContextName());
|
||||
logger.info("{} with UUID {} successfully added to context ({})", HostingNode.NAME, uuid, ContextUtility.getContextNameFromUUID(contextUUID));
|
||||
} catch (Exception e) {
|
||||
logger.error("Unable to add {} with UUID {} to context ({})", HostingNode.NAME, uuid, ContextUtility.getCurrentContextName(), e);
|
||||
logger.error("Unable to add {} with UUID {} to context ({})", HostingNode.NAME, uuid, ContextUtility.getContextNameFromUUID(contextUUID), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ public class HostingNodeManager {
|
|||
|
||||
public void removeFromContext(UUID contextUUID)
|
||||
throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||
String contextFullName = ContextCache.getInstance().getContextFullNameByUUID(contextUUID);
|
||||
String contextFullName = ContextUtility.getContextNameFromUUID(contextUUID);
|
||||
UUID uuid = UUID.fromString(containerContext.id());
|
||||
try {
|
||||
resourceRegistryPublisher.removeResourceFromContext(HostingNode.NAME, uuid, contextUUID, false);
|
||||
|
|
Loading…
Reference in New Issue