Hi,
I am developing a Web Service using Apache Axis2(axis2-1.5.4). I want to
utilize power of ServiceLifeCycle to perform some tasks during service
deployment & undeployment.
I have -
1. TESTServiceLifeCycle implements ServiceLifeCycle
2. TESTService implements Lifecycle
3. services.xml with -
<service name="TESTService"
scope="soapsession" class="test.TESTServiceLifeCycle">
<Description> Test Service
</Description>
<messageReceivers>
:
</messageReceivers>
<parameter
name="ServiceClass" locked="false">test.TESTService</parameter>
</service>
I am using eclipse Version: 3.6.1.r361 for development & deploying service
on to Apache Tomcat v6.0 Server
*Problem:*
For testing purpose, I have just put print statement in
TESTServiceLifeCycle.startUp & TESTServiceLifeCycle.shutdown. Both are
getting called during service deployment & undeployment, no issue.
But when I start using service & send many requests to the service, stratUp
is getting called many times. After that if I shut down the server, shutDown
is also getting called multiple times.(no of startUp & shutDown getting
called are same.)
*Expectation:*
I want to put service initialization stuff in startUP, so do not want
multiple calls of startUP. How should I fix the isssue?
Thanks in advance.
Sujata P. Galinde