From c0abe245c19fdc42a0648591e18adefe001247f1 Mon Sep 17 00:00:00 2001 From: Loredana Liccardo Date: Tue, 21 Oct 2014 15:08:22 +0000 Subject: [PATCH] bug fixed in class GWTdbManagerServiceImpl for the removeComputation RPC in order to pass to the getFactory method the correct scope. In GxtToolbar class logger print modified in the callback success of the removeComputation rpc. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@100824 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/toolbar/GxtToolbarFunctionality.java | 2 +- .../server/GWTdbManagerServiceImpl.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/databasesmanager/client/toolbar/GxtToolbarFunctionality.java b/src/main/java/org/gcube/portlets/user/databasesmanager/client/toolbar/GxtToolbarFunctionality.java index a3c085a..860f2c1 100644 --- a/src/main/java/org/gcube/portlets/user/databasesmanager/client/toolbar/GxtToolbarFunctionality.java +++ b/src/main/java/org/gcube/portlets/user/databasesmanager/client/toolbar/GxtToolbarFunctionality.java @@ -365,7 +365,7 @@ public class GxtToolbarFunctionality { } else { rootLogger .log(Level.INFO, - "computation can not be removed because it is already finished"); + "computation can not be removed"); } } diff --git a/src/main/java/org/gcube/portlets/user/databasesmanager/server/GWTdbManagerServiceImpl.java b/src/main/java/org/gcube/portlets/user/databasesmanager/server/GWTdbManagerServiceImpl.java index 41f0bed..488414e 100644 --- a/src/main/java/org/gcube/portlets/user/databasesmanager/server/GWTdbManagerServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/databasesmanager/server/GWTdbManagerServiceImpl.java @@ -1975,6 +1975,12 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements throw new SessionExpiredException(); try { + + logger.info("dbmanager-> Remove Computation Request received. Starting to manage the request."); + ASLSession session = SessionUtil.getAslSession(this + .getThreadLocalRequest().getSession()); + // get scope + String scope = session.getScope(); Boolean isComputationRemoved = false; // verify if this uid submitQuery request uses data in cache @@ -2005,7 +2011,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements } if (computationId != null) { - StatisticalManagerFactory factory = getFactory(""); + StatisticalManagerFactory factory = getFactory(scope); try { factory.removeComputation(computationId); // remove submit query result @@ -2013,7 +2019,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements // System.out.println("computation removed"); isComputationRemoved = true; } catch (Exception e) { - e.printStackTrace(); +// e.printStackTrace(); logger.info("dbmanager-> Could not remove the computation ID " + computationId