Fixing handlers
This commit is contained in:
parent
a8f4791949
commit
07fe3ed96e
|
@ -105,12 +105,12 @@ public class EServiceHandler extends ApplicationLifecycleHandler {
|
|||
Set<UUID> startContextsUUID = new HashSet<>();
|
||||
ContextCache contextCache = ContextCache.getInstance();
|
||||
for (String token : startTokens) {
|
||||
ContextUtility.setContextFromToken(token);
|
||||
String contextFullName = ContextUtility.getContextName(token);
|
||||
UUID contextUUID = contextCache.getUUIDByFullName(contextFullName);
|
||||
startContextsUUID.add(contextUUID);
|
||||
try {
|
||||
if (create) {
|
||||
ContextUtility.setContextFromToken(token);
|
||||
eServiceManager = new EServiceManager(applicationContext);
|
||||
eServiceManager.createEService();
|
||||
applicationContext.properties()
|
||||
|
@ -147,8 +147,7 @@ public class EServiceHandler extends ApplicationLifecycleHandler {
|
|||
ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
|
||||
String previousToken = SecurityTokenProvider.instance.get();
|
||||
if (previousToken == null) {
|
||||
ContextUtility
|
||||
.setContextFromToken(applicationContext.configuration().startTokens().iterator().next());
|
||||
ContextUtility.setContextFromToken(applicationContext.configuration().startTokens().iterator().next());
|
||||
}
|
||||
try {
|
||||
Thread.currentThread().setContextClassLoader(EServiceHandler.class.getClassLoader());
|
||||
|
|
|
@ -105,12 +105,12 @@ public class HostingNodeHandler extends ContainerHandler {
|
|||
Set<UUID> startContextsUUID = new HashSet<>();
|
||||
ContextCache contextCache = ContextCache.getInstance();
|
||||
for (String token : startTokens) {
|
||||
ContextUtility.setContextFromToken(token);
|
||||
String contextFullName = ContextUtility.getContextName(token);
|
||||
UUID contextUUID = contextCache.getUUIDByFullName(contextFullName);
|
||||
startContextsUUID.add(contextUUID);
|
||||
try {
|
||||
if (create) {
|
||||
ContextUtility.setContextFromToken(token);
|
||||
hostingNodeManager = new HostingNodeManager(containerContext);
|
||||
hostingNodeManager.createHostingNode();
|
||||
containerContext.properties()
|
||||
|
|
|
@ -47,7 +47,6 @@ import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Activa
|
|||
import org.gcube.smartgears.configuration.application.ApplicationConfiguration;
|
||||
import org.gcube.smartgears.configuration.container.ContainerConfiguration;
|
||||
import org.gcube.smartgears.context.application.ApplicationContext;
|
||||
import org.gcube.smartgears.handler.resourceregistry.Constants;
|
||||
import org.gcube.smartgears.handler.resourceregistry.ContextUtility;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
Loading…
Reference in New Issue