This commit is contained in:
Lucio Lelii 2015-10-14 17:34:56 +00:00
parent 73b53a89ce
commit 98dd0d2eb5
2 changed files with 1 additions and 51 deletions

View File

@ -1,44 +0,0 @@
/**
*
*/
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<String> scopes = SmartExecutorInitializator.getScopes(ctx);
logger.debug(String.format("Scopes %s", scopes));
}
}
}

View File

@ -3,16 +3,10 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<listener>
<listener-class>org.gcube.smartgears.ContextListener</listener-class>
</listener>
<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<listener>
<listener-class>org.gcube.vremanagement.executor.SmartContextServletListener</listener-class>
</listener>
<servlet>
<servlet-name>smart-executor</servlet-name>