org.gcube.common.ghn.service
Class LifetimeListener
java.lang.Object
org.gcube.common.ghn.service.LifetimeListener
- All Implemented Interfaces:
- EventListener, javax.servlet.ServletContextListener
@WebListener
public class LifetimeListener
- extends Object
- implements javax.servlet.ServletContextListener
A ServletContextListener for managed services which notifies a ServiceManager of app lifetime events.
In servlet containers that implement version 3.0 or later of the specification, the listener is attached to the
managed app by a ServiceInitializer packaged within the app or a shared library. If the container ignores
ServiceInitializers, then the listener is attached to the managed app by virtue of its WebListener
annotation.
In servlet containers that implement earlier versions of the specification, the listener
must be configured in web.xml.
In all cases, the implementations handles redundant configurations,
in that all the listener instances after the first one short-circuit their behaviour.
- Author:
- Fabio Simeoni
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LifetimeListener
public LifetimeListener()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Copyright © 2013. All Rights Reserved.