diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java index ce6f0e7..a1c98c7 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java @@ -71,31 +71,16 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C */ private CKanUtils getCkanUtilsObj(){ - // check into session String currentScope = getASLSession().getScope(); - HttpSession httpSession = getThreadLocalRequest().getSession(); - String keyForScope = concatenateSessionKeyScope(CKAN_OBJ_KEY, currentScope); - CKanUtils instance = null; - if(httpSession.getAttribute(keyForScope) == null){ - try{ - logger.debug("The ckan util object was null"); - instance = new CKanUtilsImpl(currentScope); - - // put it into session - logger.debug("Putting object into session "); - httpSession.setAttribute(keyForScope, instance); - }catch(Exception e){ - logger.error("Unable to retrieve ckan utils", e); - } - }else{ - instance = (CKanUtils)httpSession.getAttribute(keyForScope); - logger.debug("Ckan utils object was into session"); + try{ + logger.debug("The ckan util object was null"); + instance = new CKanUtilsImpl(currentScope); + }catch(Exception e){ + logger.error("Unable to retrieve ckan utils", e); } - return instance; - } /**