You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Ashutosh Somani <as...@MIT.EDU> on 2001/03/11 23:39:53 UTC

Initialization Code?

Does anyone know if there is some way to get some code to run when you 
start up a SOAP Service? For instance, I have a SOAP Service where I just 
pass the parameters I receive to the method of another object I created 
called "trackingserver". However, I do not want to instantiate a new 
"trackingserver" object every time a new request comes in and was wondering 
if there was some way so that a tracking server object could be 
instantiated when I deployed the SOAP Service. This way, when a request 
came in, I could just pass the parameters to the method of the object.
Also, one of the things I need to do to instantiate this object is to get a 
hold of the URL of my SOAP Service (eg. 
"http://something.mit.edu:8080/soap/servlet/rpcrouter"). Does anyone know 
of a way to get the URL of the service in my server side code?
Thanks!

Ash


Re: Initialization Code?

Posted by Ea...@EAS.San-Jose.CA.US.
Tomcat will run a method named init() when it deploys a servlet for the
first time. Is this what you need?

=eas=
On 11 Mar, Ashutosh Somani wrote:
> Does anyone know if there is some way to get some code to run when you 
> start up a SOAP Service? For instance, I have a SOAP Service where I
> just pass the parameters I receive to the method of another object I
> created called "trackingserver". However, I do not want to
> instantiate a new
> "trackingserver" object every time a new request comes in and was
> wondering if there was some way so that a tracking server object
> could be instantiated when I deployed the SOAP Service. This way,
> when a request came in, I could just pass the parameters to the
> method of the object. Also, one of the things I need to do to
> instantiate this object is to get a hold of the URL of my SOAP
> Service (eg.
> "http://something.mit.edu:8080/soap/servlet/rpcrouter"). Does anyone
> know of a way to get the URL of the service in my server side code? 
> Thanks!
> 
> Ash
> 



Re: Initialization Code?

Posted by Ea...@EAS.San-Jose.CA.US.
Tomcat will run a method named init() when it deploys a servlet for the
first time. Is this what you need?

=eas=
On 11 Mar, Ashutosh Somani wrote:
> Does anyone know if there is some way to get some code to run when you 
> start up a SOAP Service? For instance, I have a SOAP Service where I
> just pass the parameters I receive to the method of another object I
> created called "trackingserver". However, I do not want to
> instantiate a new
> "trackingserver" object every time a new request comes in and was
> wondering if there was some way so that a tracking server object
> could be instantiated when I deployed the SOAP Service. This way,
> when a request came in, I could just pass the parameters to the
> method of the object. Also, one of the things I need to do to
> instantiate this object is to get a hold of the URL of my SOAP
> Service (eg.
> "http://something.mit.edu:8080/soap/servlet/rpcrouter"). Does anyone
> know of a way to get the URL of the service in my server side code? 
> Thanks!
> 
> Ash
>