Removed listener from web.xml

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@119655 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-10-13 09:29:42 +00:00
parent 7d2f4c450d
commit 5c8a24724c
2 changed files with 6 additions and 60 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

@ -1,19 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<servlet>
<servlet-name>smart-executor</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
@ -23,4 +13,4 @@
<url-pattern>/gcube/vremanagement/smart-executor</url-pattern>
</servlet-mapping>
</web-app>
</web-app>