users@jax-rpc.java.net

Re: JWSDP/S1Studio5: ServiceLifecycle.init() never invoked ?!?

From: Gero Vermaas <Gero.Vermaas_at_Sun.COM>
Date: Tue, 22 Jul 2003 09:05:22 +0200

Someone on the alias noticed that I referered to the JWDP1.2
documentation while JWSDP 1.2 is not integrated in Studio 5. However,
the API documention for 1.0 is the same for both.

Any ideas what could be causing the problems?

Regards,

Gero

On Thu, 2003-07-17 at 10:27, Gero Vermaas wrote:

> Hi,
>
> I received a question from a customer with regard to the javax.xml.rpc.server.ServiceLifecycle interface. The customer is using SunOneStudio 5 and SunOneAppServer 7 to gain experience with webservice developement.
>
> They implemented the javax.xml.rpc.server.ServiceLifecycle interface, generated a (web-centric) webservice and test client using SunOneStudio 5, and deployed it on SunOneAppserver 7. The problem now is that the init() method that they've implemented for the ServiceLifecycle never get's invoked. The strange thing is that the destroy() method (also of ServiceLifecycle) does get invoked when they invoke the webservice :-(
>
> I tried the same thing and ran into the same problem. Reading the API doc at http://java.sun.com/webservices/docs/1.2/api/javax/xml/rpc/server/ServiceLifecycle.html suggests that both init() and destroy() should be invoked. I also deployed the thing to the internal Tomcat server of SunOneStudio5 and then even the destroy() method was not invoked anymore.
>
> I've zipped up the small test project, you can download it at: http://www.xs4all.nl/~gero/servicelifecycleproblem.zip
>
> The class for which a webservice is generated is attached: TestjeImpl.java.
>
> When the WebService is invoked, it porduces the following in the server.log file of SunOneAppServer:
> [15/Jul/2003:15:22:43] INFO (32005): CORE3282: stdout: ------------------------------
> [15/Jul/2003:15:22:43] INFO (32005): CORE3282: stdout: Test webservice constructor
> [15/Jul/2003:15:22:43] INFO (32005): CORE3282: stdout: ------------------------------
> [15/Jul/2003:15:22:43] INFO (32005): CORE3282: stdout: do echo for value 1234
> [15/Jul/2003:15:22:43] INFO (32005): CORE3282: stdout: ------------------------------
> [15/Jul/2003:15:22:43] INFO (32005): CORE3282: stdout: Test webservice is destroyed!
> [15/Jul/2003:15:22:43] INFO (32005): CORE3282: stdout: beenThere: false
> [15/Jul/2003:15:22:43] INFO (32005): CORE3282: stdout: ------------------------------
>
> Any idea why the destroy() method does get invoked and the init() not?
>
> Regards,
>
> Gero
>
>