From c23955c7b1a37a95eba8fc934b341928f6cdcfb6 Mon Sep 17 00:00:00 2001 From: Loredana Liccardo Date: Wed, 17 Sep 2014 14:43:14 +0000 Subject: [PATCH] - Class WsUtil replaced by SessionUtil in class GWTdbManagerServiceImpl. - logger.error() added in class GWTdbManagerServiceImpl. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@99989 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../server/GWTdbManagerServiceImpl.java | 47 ++-- .../server/util/SessionUtil.java | 12 +- .../databasesmanager/server/util/WsUtil.java | 252 +++++++++--------- 3 files changed, 157 insertions(+), 154 deletions(-) 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 330850b..ad15435 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 @@ -16,7 +16,6 @@ import javax.servlet.http.HttpSession; import net.sf.ehcache.CacheManager; import net.sf.ehcache.Ehcache; -import net.sf.ehcache.config.CacheConfiguration; import org.apache.regexp.RE; import org.gcube.application.framework.core.session.ASLSession; @@ -54,16 +53,13 @@ import org.gcube.portlets.user.databasesmanager.client.datamodel.Result; import org.gcube.portlets.user.databasesmanager.client.datamodel.Row; import org.gcube.portlets.user.databasesmanager.client.utils.ConstantsPortlet; import org.gcube.portlets.user.databasesmanager.server.util.SessionUtil; -import org.gcube.portlets.user.databasesmanager.server.util.WsUtil; import com.extjs.gxt.ui.client.data.BasePagingLoadResult; import com.extjs.gxt.ui.client.data.PagingLoadConfig; import com.extjs.gxt.ui.client.data.PagingLoadResult; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.thoughtworks.xstream.XStream; import org.apache.log4j.Logger; -//import org.apache.jcs.JCS; -//import org.apache.jcs.access.CacheAccess; -//import org.apache.jcs.utils.props.PropertyLoader; + public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements GWTdbManagerService { @@ -111,7 +107,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements } catch (Exception e) { logger.error("dbmanager-> Failed to get cache: " + e); - e.printStackTrace(); +// e.printStackTrace(); throw e; } } @@ -134,14 +130,14 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements } catch (Exception e) { // TODO: handle exception logger.error("dbmanager-> " + e); - e.printStackTrace(); +// e.printStackTrace(); } } private void initVariables() { - ASLSession session = WsUtil.getAslSession(this.getThreadLocalRequest() + ASLSession session = SessionUtil.getAslSession(this.getThreadLocalRequest() .getSession()); // the result generated in the LoadTables method @@ -260,6 +256,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements // TODO: handle exception // e.printStackTrace(); // throw new Exception("Failed to load data. " + e); + logger.error("dbmanager-> " + e); throw e; } // } @@ -351,8 +348,9 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements } catch (Exception e) { // TODO: handle exception - e.printStackTrace(); +// e.printStackTrace(); // throw new Exception("Failed to load data " + ); + logger.error("dbmanager-> " + e); throw e; } @@ -452,8 +450,9 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements } catch (Exception e) { // TODO: handle exception - e.printStackTrace(); +// e.printStackTrace(); // throw new Exception("Failed to load data. " + e); + logger.error("dbmanager-> " + e); throw e; } @@ -554,6 +553,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements } catch (Exception e) { // e.printStackTrace(); // throw new Exception("Failed to load data. " + e); + logger.error("dbmanager-> " + e); throw e; } @@ -803,6 +803,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements "javax.xml.ws.soap.SOAPFaultException: java.lang.IndexOutOfBoundsException")) { e = new Exception("ServerException"); } + logger.error("dbmanager-> " + e); throw e; } @@ -1259,7 +1260,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements // } private synchronized List getSubmitQueryResult(String submitQueryUID) { - ASLSession session = WsUtil.getAslSession(this.getThreadLocalRequest() + ASLSession session = SessionUtil.getAslSession(this.getThreadLocalRequest() .getSession()); HashMap> submitQueryResult = (HashMap>) session .getAttribute("submitQueryResult"); @@ -1272,7 +1273,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements private synchronized List getSubmitQueryResultParsed( String submitQueryUID) { - ASLSession session = WsUtil.getAslSession(this.getThreadLocalRequest() + ASLSession session = SessionUtil.getAslSession(this.getThreadLocalRequest() .getSession()); HashMap> submitQueryResultParsed = (HashMap>) session .getAttribute("submitQueryResultParsed"); @@ -1287,7 +1288,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements private synchronized void updateSubmitQueryResultParsed( String submitQueryUID, List data) { - ASLSession session = WsUtil.getAslSession(this.getThreadLocalRequest() + ASLSession session = SessionUtil.getAslSession(this.getThreadLocalRequest() .getSession()); HashMap> submitQueryResultParsed = (HashMap>) session .getAttribute("submitQueryResultParsed"); @@ -1300,7 +1301,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements } private synchronized void removeResultParsed(String submitQueryUID) { - ASLSession session = WsUtil.getAslSession(this.getThreadLocalRequest() + ASLSession session = SessionUtil.getAslSession(this.getThreadLocalRequest() .getSession()); HashMap> submitQueryResultParsed = (HashMap>) session .getAttribute("submitQueryResultParsed"); @@ -1316,7 +1317,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements private synchronized void updateSubmitQueryResultMap(String submitQueryUID, List result) { if (submitQueryUID != null) { - ASLSession session = WsUtil.getAslSession(this + ASLSession session = SessionUtil.getAslSession(this .getThreadLocalRequest().getSession()); HashMap> submitQueryResult = (HashMap>) session .getAttribute("submitQueryResult"); @@ -1326,7 +1327,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements } private synchronized void removeResult(String submitQueryUID) { - ASLSession session = WsUtil.getAslSession(this.getThreadLocalRequest() + ASLSession session = SessionUtil.getAslSession(this.getThreadLocalRequest() .getSession()); HashMap> submitQueryResult = (HashMap>) session .getAttribute("submitQueryResult"); @@ -1342,7 +1343,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements private synchronized void updateJobStatus(String jobID, String status) { if (jobID != null) { // add the job status - ASLSession session = WsUtil.getAslSession(this + ASLSession session = SessionUtil.getAslSession(this .getThreadLocalRequest().getSession()); HashMap JobStatusMap = (HashMap) session .getAttribute("JobStatusList"); @@ -1353,7 +1354,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements // remove job with the related status private synchronized void removeJobStatus(String jobID) { - ASLSession session = WsUtil.getAslSession(this.getThreadLocalRequest() + ASLSession session = SessionUtil.getAslSession(this.getThreadLocalRequest() .getSession()); HashMap JobStatusMap = (HashMap) session .getAttribute("JobStatusList"); @@ -1366,7 +1367,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements // get job status private synchronized String getJobStatus(String jobID) { - ASLSession session = WsUtil.getAslSession(this.getThreadLocalRequest() + ASLSession session = SessionUtil.getAslSession(this.getThreadLocalRequest() .getSession()); HashMap JobStatusMap = (HashMap) session .getAttribute("JobStatusList"); @@ -1378,7 +1379,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements private synchronized void updateJob(String jobID, String computationId) { if (jobID != null) { // add the computation in the map - ASLSession session = WsUtil.getAslSession(this + ASLSession session = SessionUtil.getAslSession(this .getThreadLocalRequest().getSession()); HashMap computationIDMap = (HashMap) session .getAttribute("ComputationIDList"); @@ -1392,7 +1393,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements if (jobID != null) { // System.out.println("remove jobID " + job); // add the computation in the map - ASLSession session = WsUtil.getAslSession(this + ASLSession session = SessionUtil.getAslSession(this .getThreadLocalRequest().getSession()); HashMap computationIDMap = (HashMap) session .getAttribute("ComputationIDList"); @@ -1409,7 +1410,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements private synchronized boolean checkJob(String jobID) { boolean isContained = false; if (jobID != null) { - ASLSession session = WsUtil.getAslSession(this + ASLSession session = SessionUtil.getAslSession(this .getThreadLocalRequest().getSession()); HashMap computationIDMap = (HashMap) session .getAttribute("ComputationIDList"); @@ -1471,6 +1472,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements } catch (Exception e) { logger.info("dbmanager-> startComputation: the job submit has failed!"); // e.printStackTrace(); + logger.error("dbmanager-> " + e); throw e; } } @@ -1811,6 +1813,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements employeeCache.remove(key); } catch (Exception e) { // TODO: handle exception + logger.error("dbmanager-> "+ e); throw new Exception("Failure to clear the cache. " + e); } } diff --git a/src/main/java/org/gcube/portlets/user/databasesmanager/server/util/SessionUtil.java b/src/main/java/org/gcube/portlets/user/databasesmanager/server/util/SessionUtil.java index 6c1ffda..c5b3937 100644 --- a/src/main/java/org/gcube/portlets/user/databasesmanager/server/util/SessionUtil.java +++ b/src/main/java/org/gcube/portlets/user/databasesmanager/server/util/SessionUtil.java @@ -20,7 +20,7 @@ public class SessionUtil { protected static Logger logger = Logger.getLogger(SessionUtil.class); - public static ASLSession getSession(HttpSession httpSession) { + public static ASLSession getAslSession(HttpSession httpSession) { String sessionID = httpSession.getId(); String user = (String) httpSession .getAttribute(ScopeHelper.USERNAME_ATTRIBUTE); @@ -28,7 +28,7 @@ public class SessionUtil { if (user == null) { // user = "loredana.liccardo"; - user = "dbmanager"; + user = "database.manager"; httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, user); ScopeProvider.instance.set("/gcube/devsec/devVRE"); ASLSession session = SessionManager.getInstance().getASLSession( @@ -48,7 +48,7 @@ public class SessionUtil { } public static StatisticalManagerFactory getFactory(HttpSession httpSession) { - ASLSession session = getSession(httpSession); + ASLSession session = getAslSession(httpSession); return getFactory(session); } @@ -68,7 +68,7 @@ public class SessionUtil { public static StatisticalManagerDataSpace getDataSpaceService( HttpSession httpSession) { - ASLSession session = getSession(httpSession); + ASLSession session = getAslSession(httpSession); return getDataSpaceService(session); } @@ -81,7 +81,7 @@ public class SessionUtil { } public static String getUsername(HttpSession httpSession) { - ASLSession session = getSession(httpSession); + ASLSession session = getAslSession(httpSession); return getUsername(session); } @@ -90,7 +90,7 @@ public class SessionUtil { } public static String getScope(HttpSession httpSession) { - ASLSession session = getSession(httpSession); + ASLSession session = getAslSession(httpSession); return getScope(session); } diff --git a/src/main/java/org/gcube/portlets/user/databasesmanager/server/util/WsUtil.java b/src/main/java/org/gcube/portlets/user/databasesmanager/server/util/WsUtil.java index 7f9a660..dd6b785 100644 --- a/src/main/java/org/gcube/portlets/user/databasesmanager/server/util/WsUtil.java +++ b/src/main/java/org/gcube/portlets/user/databasesmanager/server/util/WsUtil.java @@ -1,128 +1,128 @@ -package org.gcube.portlets.user.databasesmanager.server.util; - -import javax.servlet.http.HttpSession; - -import org.apache.log4j.Logger; -import org.gcube.application.framework.core.session.ASLSession; -import org.gcube.application.framework.core.session.SessionManager; -//import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager; -//import org.gcube.applicationsupportlayer.social.NotificationsManager; -//import org.gcube.common.homelibrary.home.HomeLibrary; -//import org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException; -//import org.gcube.common.homelibrary.home.exceptions.InternalErrorException; -//import org.gcube.common.homelibrary.home.workspace.Workspace; -//import org.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException; -import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; -//import org.gcube.portlets.user.workspace.client.model.InfoContactModel; -//import org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder; -//import org.gcube.portlets.user.workspace.server.notifications.NotificationsProducer; -//import org.gcube.portlets.user.workspace.server.resolver.UriResolverReaderParameter; -//import org.gcube.portlets.user.workspace.server.shortener.UrlShortener; -//import org.gcube.portlets.user.workspace.server.util.resource.PropertySpecialFolderReader; -//import org.gcube.portlets.user.workspace.server.util.scope.ScopeUtilFilter; - - -/** - * - * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it - * @Feb 18, 2014 - * - */ -public class WsUtil { - - public static final String USERNAME_ATTRIBUTE = ScopeHelper.USERNAME_ATTRIBUTE; -// public static final String FOLDERIMPORTER_ATTRIBUTE = "FOLDER_IMPORTER"; -// public static final String METADATACONVERTER_ATTRIBUTE = "METADATA_CONVERTER"; -// public static final String WORKSPACE_EVENT_COLLECTOR_ATTRIBUTE = "EVENT_COLLECTOR"; -// public static final String WORKSPACEBUILDER_ATTRIBUTE = "WORKSPACEBUILDER"; -// public static final String NOTIFICATION_MANAGER = "NOTIFICATION_MANAGER"; -// public static final String NOTIFICATION_PRODUCER = "NOTIFICATION_PRODUCER"; -// public static final String WS_RUN_IN_TEST_MODE = "WS_RUN_IN_TEST_MODE"; -// public static final String WORKSPACE_SCOPE_UTIL = "WORKSPACE_SCOPE_UTIL"; -// public static final String URL_SHORTENER_SERVICE = "URL_SHORTENER_SERVICE"; -// public static final String URI_RESOLVER_SERVICE = "URI_RESOLVER_SERVICE"; -// public static final String PROPERTY_SPECIAL_FOLDER = "PROPERTY_SPECIAL_FOLDER"; -// public static final String NOTIFICATION_PORTLET_CLASS_ID = "org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl"; //IN DEV - -// public static final String TEST_SCOPE = "/gcube/devsec"; - public static final String TEST_SCOPE = "/gcube/devsec/devVRE"; - - -// public static final String TEST_USER = "pasquale.pagano"; -// public static final String TEST_USER = "federico.defaveri"; -// public static final String TEST_USER = "massimiliano.assante"; -// public static final String TEST_USER = "pasquale.pagano"; -// public static final String TEST_USER = "aureliano.gentile"; -// public static final String TEST_USER = "antonio.gioia"; - - //COMMENT THIS FOR RELEASE -// public static final String TEST_USER = "francesco.mangiacrapa"; -// public static final String TEST_USER_FULL_NAME = "Francesco Mangiacrapa"; - - //UNCOMMENT THIS FOR RELEASE -// public static final String TEST_USER = "test.user"; -// public static final String TEST_USER_FULL_NAME = "Test User"; - - public static final String TEST_USER = "dbmanager"; - public static final String TEST_USER_FULL_NAME = "dbmanager"; - - - protected static Logger logger = Logger.getLogger(WsUtil.class); - - public static boolean withoutPortal = false; - - public static ASLSession getAslSession(HttpSession httpSession) - { - String sessionID = httpSession.getId(); - String user = (String) httpSession.getAttribute(USERNAME_ATTRIBUTE); - ASLSession session; - - if (user == null) { - - /*USE ANOTHER ACCOUNT (OTHERWHISE BY TEST_USER) FOR RUNNING - * COMMENT THIS IN DEVELOP ENVIROMENT (UNCOMMENT IN PRODUCTION)*/ - user=TEST_USER; - - //UNCOMMENT THIS IN DEVELOP ENVIROMENT -// user = "francesco.mangiacrapa"; -// user = "valentina.marioli"; - - logger.warn("WORKSPACE PORTLET STARTING IN TEST MODE - NO USER FOUND - PORTLETS STARTING WITH FOLLOWING SETTINGS:"); - logger.warn("session id: "+sessionID); - logger.warn("TEST_USER: "+user); - logger.warn("TEST_SCOPE: "+TEST_SCOPE); - logger.warn("USERNAME_ATTRIBUTE: "+USERNAME_ATTRIBUTE); - session = SessionManager.getInstance().getASLSession(sessionID, user); - session.setScope(TEST_SCOPE); - - - //MANDATORY FOR SOCIAL LIBRARY - session.setUserAvatarId(user + "Avatar"); - session.setUserFullName(TEST_USER_FULL_NAME); - session.setUserEmailAddress(user + "@mail.test"); - - //SET HTTP SESSION ATTRIBUTE - httpSession.setAttribute(USERNAME_ATTRIBUTE, user); - - withoutPortal = true; - - return session; - - }else if(user.compareToIgnoreCase(TEST_USER)==0){ - - withoutPortal = true; - -//*** COMMENT THIS IN PRODUCTION ENVIROMENT -// }else if(user.compareToIgnoreCase("francesco.mangiacrapa")==0){ +//package org.gcube.portlets.user.databasesmanager.server.util; +// +//import javax.servlet.http.HttpSession; +// +//import org.apache.log4j.Logger; +//import org.gcube.application.framework.core.session.ASLSession; +//import org.gcube.application.framework.core.session.SessionManager; +////import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager; +////import org.gcube.applicationsupportlayer.social.NotificationsManager; +////import org.gcube.common.homelibrary.home.HomeLibrary; +////import org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException; +////import org.gcube.common.homelibrary.home.exceptions.InternalErrorException; +////import org.gcube.common.homelibrary.home.workspace.Workspace; +////import org.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException; +//import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; +////import org.gcube.portlets.user.workspace.client.model.InfoContactModel; +////import org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder; +////import org.gcube.portlets.user.workspace.server.notifications.NotificationsProducer; +////import org.gcube.portlets.user.workspace.server.resolver.UriResolverReaderParameter; +////import org.gcube.portlets.user.workspace.server.shortener.UrlShortener; +////import org.gcube.portlets.user.workspace.server.util.resource.PropertySpecialFolderReader; +////import org.gcube.portlets.user.workspace.server.util.scope.ScopeUtilFilter; +// +// +///** +// * +// * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it +// * @Feb 18, 2014 +// * +// */ +//public class WsUtil { +// +// public static final String USERNAME_ATTRIBUTE = ScopeHelper.USERNAME_ATTRIBUTE; +//// public static final String FOLDERIMPORTER_ATTRIBUTE = "FOLDER_IMPORTER"; +//// public static final String METADATACONVERTER_ATTRIBUTE = "METADATA_CONVERTER"; +//// public static final String WORKSPACE_EVENT_COLLECTOR_ATTRIBUTE = "EVENT_COLLECTOR"; +//// public static final String WORKSPACEBUILDER_ATTRIBUTE = "WORKSPACEBUILDER"; +//// public static final String NOTIFICATION_MANAGER = "NOTIFICATION_MANAGER"; +//// public static final String NOTIFICATION_PRODUCER = "NOTIFICATION_PRODUCER"; +//// public static final String WS_RUN_IN_TEST_MODE = "WS_RUN_IN_TEST_MODE"; +//// public static final String WORKSPACE_SCOPE_UTIL = "WORKSPACE_SCOPE_UTIL"; +//// public static final String URL_SHORTENER_SERVICE = "URL_SHORTENER_SERVICE"; +//// public static final String URI_RESOLVER_SERVICE = "URI_RESOLVER_SERVICE"; +//// public static final String PROPERTY_SPECIAL_FOLDER = "PROPERTY_SPECIAL_FOLDER"; +//// public static final String NOTIFICATION_PORTLET_CLASS_ID = "org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl"; //IN DEV +// +//// public static final String TEST_SCOPE = "/gcube/devsec"; +// public static final String TEST_SCOPE = "/gcube/devsec/devVRE"; +// +// +//// public static final String TEST_USER = "pasquale.pagano"; +//// public static final String TEST_USER = "federico.defaveri"; +//// public static final String TEST_USER = "massimiliano.assante"; +//// public static final String TEST_USER = "pasquale.pagano"; +//// public static final String TEST_USER = "aureliano.gentile"; +//// public static final String TEST_USER = "antonio.gioia"; +// +// //COMMENT THIS FOR RELEASE +//// public static final String TEST_USER = "francesco.mangiacrapa"; +//// public static final String TEST_USER_FULL_NAME = "Francesco Mangiacrapa"; +// +// //UNCOMMENT THIS FOR RELEASE +//// public static final String TEST_USER = "test.user"; +//// public static final String TEST_USER_FULL_NAME = "Test User"; +// +// public static final String TEST_USER = "dbmanager"; +// public static final String TEST_USER_FULL_NAME = "dbmanager"; +// +// +// protected static Logger logger = Logger.getLogger(WsUtil.class); +// +// public static boolean withoutPortal = false; +// +// public static ASLSession getAslSession(HttpSession httpSession) +// { +// String sessionID = httpSession.getId(); +// String user = (String) httpSession.getAttribute(USERNAME_ATTRIBUTE); +// ASLSession session; +// +// if (user == null) { +// +// /*USE ANOTHER ACCOUNT (OTHERWHISE BY TEST_USER) FOR RUNNING +// * COMMENT THIS IN DEVELOP ENVIROMENT (UNCOMMENT IN PRODUCTION)*/ +// user=TEST_USER; +// +// //UNCOMMENT THIS IN DEVELOP ENVIROMENT +//// user = "francesco.mangiacrapa"; +//// user = "valentina.marioli"; +// +// logger.warn("WORKSPACE PORTLET STARTING IN TEST MODE - NO USER FOUND - PORTLETS STARTING WITH FOLLOWING SETTINGS:"); +// logger.warn("session id: "+sessionID); +// logger.warn("TEST_USER: "+user); +// logger.warn("TEST_SCOPE: "+TEST_SCOPE); +// logger.warn("USERNAME_ATTRIBUTE: "+USERNAME_ATTRIBUTE); +// session = SessionManager.getInstance().getASLSession(sessionID, user); +// session.setScope(TEST_SCOPE); +// +// +// //MANDATORY FOR SOCIAL LIBRARY +// session.setUserAvatarId(user + "Avatar"); +// session.setUserFullName(TEST_USER_FULL_NAME); +// session.setUserEmailAddress(user + "@mail.test"); +// +// //SET HTTP SESSION ATTRIBUTE +// httpSession.setAttribute(USERNAME_ATTRIBUTE, user); // // withoutPortal = true; -//*** END UNCOMMENT - }else{ - - withoutPortal = false; - } - - return SessionManager.getInstance().getASLSession(sessionID, user); - } - -} +// +// return session; +// +// }else if(user.compareToIgnoreCase(TEST_USER)==0){ +// +// withoutPortal = true; +// +////*** COMMENT THIS IN PRODUCTION ENVIROMENT +//// }else if(user.compareToIgnoreCase("francesco.mangiacrapa")==0){ +//// +//// withoutPortal = true; +////*** END UNCOMMENT +// }else{ +// +// withoutPortal = false; +// } +// +// return SessionManager.getInstance().getASLSession(sessionID, user); +// } +// +//}