diff --git a/.classpath b/.classpath
index d3c5af8..953de0b 100644
--- a/.classpath
+++ b/.classpath
@@ -25,7 +25,6 @@
-
diff --git a/src/main/java/org/gcube/vremanagement/executor/SmartContextServletListener.java b/src/main/java/org/gcube/vremanagement/executor/SmartContextServletListener.java
new file mode 100644
index 0000000..7b78dec
--- /dev/null
+++ b/src/main/java/org/gcube/vremanagement/executor/SmartContextServletListener.java
@@ -0,0 +1,44 @@
+/**
+ *
+ */
+package org.gcube.vremanagement.executor;
+
+import java.util.List;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.gcube.smartgears.ContextProvider;
+import org.gcube.smartgears.context.application.ApplicationContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
+ */
+public class SmartContextServletListener implements ServletContextListener {
+
+ /**
+ * Logger
+ */
+ private static Logger logger = LoggerFactory.getLogger(SmartContextServletListener.class);
+
+ /**{@inheritDoc}*/
+ @Override
+ public void contextDestroyed(ServletContextEvent servletContextEvent) {
+ logger.debug("Bye Bye SmartExecutor");
+ }
+
+ /**{@inheritDoc}*/
+ @Override
+ public void contextInitialized(ServletContextEvent servletContextEvent) {
+ logger.debug("Hello SmartExecutor");
+ ApplicationContext ctx = ContextProvider.get();
+ logger.debug(String.format("ApplicationContext %s", ctx));
+ if(ctx!=null){
+ List scopes = SmartExecutorInitializator.getScopes(ctx);
+ logger.debug(String.format("Scopes %s", scopes));
+ }
+ }
+
+}
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 8a0d371..762c48a 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -1,9 +1,19 @@
-
-
+
+
+
+ org.gcube.smartgears.ContextListener
+
+
+ com.sun.xml.ws.transport.http.servlet.WSServletContextListener
+
+
+ org.gcube.vremanagement.executor.SmartContextServletListener
+
+
smart-executor
com.sun.xml.ws.transport.http.servlet.WSServlet
@@ -13,4 +23,4 @@
/gcube/vremanagement/smart-executor
-
+
\ No newline at end of file