diff --git a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/WsTaskExecutorWidgetServiceImpl.java b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/WsTaskExecutorWidgetServiceImpl.java index 37e688a..e2d07f6 100644 --- a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/WsTaskExecutorWidgetServiceImpl.java +++ b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/WsTaskExecutorWidgetServiceImpl.java @@ -54,6 +54,8 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem WsTaskExecutorWidgetService { private static Logger logger = LoggerFactory.getLogger(WsTaskExecutorWidgetServiceImpl.class); + public static final String DM_RESOURCE_NAME = "DataMiner"; + public static final String DM_RESOURCE_CATEGORY = "DataAnalysis"; /** * Checks if is within portal. @@ -101,9 +103,9 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem GCubeUser user = PortalContextUtil.getUserLogged(this.getThreadLocalRequest()); String scope = PortalContextUtil.getCurrentScope(this.getThreadLocalRequest()); - logger.debug("Found user "+user+ ", scope: "+scope+" into PortalContext, using them..."); + logger.debug("Into PortalContext I Found the user "+user.getUsername()+ "by using the scope: "+scope+" , using it..."); ScopeProvider.instance.set(scope); - logger.info("Using user "+user.getUsername()+ "and scope: "+scope+" to intancing the "+WorkspaceDataMinerTaskExecutor.class.getSimpleName()); + logger.info("Using user "+user.getUsername()+ "and scope: "+scope+" for intancing the "+WorkspaceDataMinerTaskExecutor.class.getSimpleName()); WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance(); //exec.withOwner(user.getUsername()); return exec; @@ -135,9 +137,9 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem //FILTERING THE VREs FOR GATEWAY long theGroupId = PortalContext.getConfiguration().getCurrentGroupId(this.getThreadLocalRequest()); - logger.info("Searching for userId {} and grouId {}", userId, theGroupId); + logger.info("Searching registered VREs for userId {} and grouId {}", userId, theGroupId); Set listOfGroups = groupManager.listGroupsByUserAndSiteGroupId(userId, theGroupId); - logger.info("Found {} GcubeGroups", listOfGroups.size()); + logger.info("Found {} GcubeGroups (alias VREs) in which the User {} is registred", listOfGroups.size(), user.getUsername()); for (GCubeGroup gCubeGroup : listOfGroups) { GcubeScopeType scopeType=null; @@ -174,7 +176,8 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem List dmScopes = new ArrayList(listOfScopes.size()); //GETTING THE ENDPOINTS WHERE THE DM IS DEPLOYED for (GcubeScope gcubeScope : listOfScopes) { - boolean exists = RuntimeResourceReader.serviceEndpointExists(scope, "DataMiner", "DataAnalysis"); + boolean exists = RuntimeResourceReader.serviceEndpointExists(scope, DM_RESOURCE_NAME, DM_RESOURCE_CATEGORY); + logger.debug("Is the DM deployed in the scope {}? {}",scope, exists); if(exists) dmScopes.add(gcubeScope); } diff --git a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/util/RuntimeResourceReader.java b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/util/RuntimeResourceReader.java index 7812bbc..4123372 100644 --- a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/util/RuntimeResourceReader.java +++ b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/util/RuntimeResourceReader.java @@ -141,7 +141,7 @@ public class RuntimeResourceReader { } ServiceEndpoint sEp = listEndPoints.get(0); //Returning the first EndPoint. I'm assuming that only one instance exists for input RR - logger.info("{} found in the scope {}",ServiceEndpoint.class.getSimpleName(),scope); + logger.info("The RR with Profile/Name '{}' and Profile/Category '{}' is found in the instancied scope", resourceName, resourceCategory); return sEp; }