perfsonar-dev - Service (un)Initialization implementation
Subject: perfsonar development work
List archive
- From: Uros Juvan <>
- To:
- Cc: Uros Juvan <>
- Subject: Service (un)Initialization implementation
- Date: Wed, 11 Oct 2006 17:45:20 +0200
I will be adding perfSONAR services initialization and uninitialization
routines, implemented as ServletContextListeners.
I am planning to add class
org.perfsonar.commons.container.listeners.StartupInitializer
for which we have to add the following lines to AXIS's WEB-INF/web.xml:
<listener>
<listener-class>org.perfsonar.commons.container.listeners.StartupInitializer</listener-class>
</listener>
right after the last <listener> entry.
This code has two methods:
* contextInitialized:
takes care of initialization of service components:
AuxiliaryComponentManager.getInstance();
* contextDestroyed:
takes care of uninitialization of service components
by walking over a Map of components implementing
AuxiliaryThreadedComponent
For StartupInitializer to compile, I have to add servlet-api.jar artifact to
libs-download-targets.xml. Thank you Loukik for adding it to our repository
the other day :)
I had to add another interface extending AuxiliaryComponent, called
AuxiliaryThreadedComponent, which must be implemented by all components
running in infinite loop of a spawned thread. AuxiliaryThreadedComponent
interface just adds stopThread method, used to terminate thread and
effectively a infinite loop.
I also changed interface simple Scheduler implements from AuxiliaryComponent
to AuxiliaryThreadedComponent and added method stopThread, which in turn
calls stopScheduler method.
componentsIterator method was added to AuxiliaryComponentManager class to
support iteration over all the initialized components. This is needed for
contextDestroyed of StartupInitializer class to properly call stopThread
method for all components implementing AuxiliaryThreadedComponent.
Consequence of these modifications:
1. Start LS Registration scheduler at tomcat startup
2. Bugfix of Tomcat not stopping if LS Registration scheduler started
already
Do you think I can commit those changes to SVN? Maciej already agreed,
Loukik, Roman, others?
Regards,
--
Uroš Juvan
Arnes
- Service (un)Initialization implementation, Uros Juvan, 10/11/2006
- Re: [pS-dev] Service (un)Initialization implementation, Roman Lapacz, 10/12/2006
- Re: [pS-dev] Service (un)Initialization implementation, Uros Juvan, 10/13/2006
- Re: [pS-dev] Service (un)Initialization implementation, Uros Juvan, 10/13/2006
- Re: [pS-dev] Service (un)Initialization implementation, Roman Lapacz, 10/13/2006
- Re: [pS-dev] Service (un)Initialization implementation, Uros Juvan, 10/13/2006
- Re: [pS-dev] Service (un)Initialization implementation, Roman Lapacz, 10/13/2006
- Re: [pS-dev] Service (un)Initialization implementation, Uros Juvan, 10/13/2006
- Re: [pS-dev] Service (un)Initialization implementation, Roman Lapacz, 10/13/2006
- Re: [pS-dev] Service (un)Initialization implementation, Uros Juvan, 10/13/2006
- Re: [pS-dev] Service (un)Initialization implementation, Uros Juvan, 10/13/2006
- Re: [pS-dev] Service (un)Initialization implementation, Roman Lapacz, 10/12/2006
Archive powered by MHonArc 2.6.16.