Hi Michele I am saying you need to implement init() and destroy() because that is what your exception states. isn't it?
But to be more precise, please read an articel at http://www.developer.com/java/web/print.php/3620661 then you should know the aim of the two methods a bit better. Be not surprised if iot does not match your expectation to 100%, I am not happy too with this somehow outdated articel. But it is given for refrence in many places in all the previous e-mails. On my atempt to implement user/client sessions I struggled and after all I give up because statefull sessions seams to be an axis2-dream and are not fully understand by the team, and lifecycle is not what I can use. Also, I got the advise to do it myself, now that is what I do. Depending on your session scope which can be one of scope={request|soapsession|transport|application} init() and destroy() are called at different times in relation to the session scope established. in application scope init() is called and if not there and exception is triggerd, is called when your service is deployed, when axis2 starts. And destroy() is called when your service is stopped or when axis2 is stopped or when tomcat is stopped. in scope=sopasession it is erratic! on the first call to any method the ServiceClient makes init(9 is called followed by the call to your intended method such as MyService.start(); But when the second client does the same in this scope, then MyService.destroy() is called followed by MyService.init() followed by MyService.start(); This has a very negative efect to client#1 as the ServiceGroupContextID gets killed and reestablished with a new value, of which client#2 is informed but client#1 not, and hence makes it fail. And so on for each consecutive client starting up in its thread in this scope- BUT THIS SEAMS TO BE MY PROBLEM. - the article http://www.developer.com/java/web/print.php/3620661 will give you some insigth. The aim of init() depends on your sessions scope, AFAIK. In scope=application init() is called when the service is deployed i.e. when tomcat starts, axis2 starts and hence all registered servies are deployed. init() can then be used to establish i.e. an ehcache into which you can store your session beans under lets say a UUID and mange yourself user sessions. destroy() is called when such a service shuts down or when axis2 is shut or tomcat. In this case destroy() is called and can be used to call i.e. a logout() on each session bean to indicate to a legacy server that a particular user session has logged out. I hope it helps you. Rregards Josef -----Ursprüngliche Nachricht----- Von: Michele Mazzucco [mailto:[EMAIL PROTECTED] Gesendet: Montag, 5. März 2007 11:01 An: [email protected] Betreff: Re: AW: [axis2] problem with service deployed in application scope Hi Josef, do I need those methods? The service uses lifecycle management (it's supplied by another class) which provides the methods defined by org.apache.axis2.engine.ServiceLifeCycle (namely startUp() and shutDown()). What's the aim of the init() and destroy methods()? Thanks, Michele On Mon, 2007-03-05 at 10:12 +0100, Stadelmann Josef wrote: > Did you add the init() and the destroy() method to your i.e. > MyService.java ? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
