Hi Gerry, moch,

This has been discussed before without a real solution implemented in code. It's my 
feeling that any service deployed with application scope should be initialised the 
moment that it is created - but this is a matter for the dev team.

There was a solution proposed by Patrick Houbaux which you can find here: 
http://marc.theaimsgroup.com/?l=axis-user&m=107174887818252&w=2

As long as you ensure that all the variables you want to pre-configure are static then 
this solution should work - the Servlet container will call the Servlet which will 
initialise the static class members. These will then be used when the web service is 
invoked. 

Good Luck!

Richard


-----Original Message-----
From: moch [mailto:[EMAIL PROTECTED] 
Sent: 31 December 2003 09:19
To: [EMAIL PROTECTED]
Subject: Re: Re: How to load a Service at startup

Hi, Gerry Gao

     A sample endpoint is -l"http://localhost:8080/axis/services/Test";, is it a 
servlet?

        


>Hi moch:
>    What's the endpoint of your service (web service?)?
>
>    I think the overhead is to create the endpoint.
>
>    If it is a servlet, you can make it load-on-startup by the web.xml.
>
>    If ejb or other java class, especially .jws, I have no idea.
>
>    Maybe you can try to use a servlet which is load-on-startup to load the
>service once at startup.
>
>    Rgds!
>
>                                                       Gerry Gao
>----- Original Message -----
>From: "moch" <[EMAIL PROTECTED]>
>To: "axis-user" <[EMAIL PROTECTED]>
>Sent: Tuesday, December 30, 2003 23:32
>Subject: How to load a Service at startup
>
>
>> Hi all
>>
>>     I want to startup a service as tomcat is started, because the first
>time to call a service seems to init a service
>> instance and always take several secends.
>> How can I do this using axis+tomcat?
>>     Anybody can help me? Thanks.
>>

 
                                 
ããããããããmoch

ãããããããããã2003-12-31



Reply via email to