axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Mazzucco <Michele.Mazzu...@ncl.ac.uk>
Subject Re: AW: AW: AW: [axis2] problem with service deployed in application scope
Date Mon, 05 Mar 2007 14:14:43 GMT
On Mon, 2007-03-05 at 14:43 +0100, Stadelmann Josef wrote:
> Hi Michele
> 
> To your problem:
> Again, I am saying you need to implement init() and destroy() because that is 
> what your exception states. doesn't it?

Yes, that's the reason. I've found this old "article"
http://wso2.org/library/163 , however more recent documentation doesn't
mention this "requirement". 
> 
> If ServiceLifeCycle does not need it, why does your service then rais an exception 
> which referes to init() and destroy()? I don't know.

I don't know:
a - when the ServiceLifeCycle interface was introduced some code was not
updated :( (and in fact the error is logged at INFO level).
b - if those methods are really needed it would be much better to create
an interface declaring those 2 methods instead of using reflection.

> 
> 
> 
> What I want:
> I would need an instance of class MyService, for each client session starting in 
> a thread a state full object. I would need this instance to maintain session state 
> from login to logout.
> 
> for that I can not use scope=request and have MyService maintain session state.
> 
> for that I can not use scope=application, MyService would be singelton an hence
> not maintain session state by itself.
> 
> for that I migth use scope=transport or scope=soapsession, but I have the
> mentioned side effects for scope=soapsession.
> 
> 
> So what can I do? I go to use scope=application and do the caching of statefull
> session beans myself using ehcache or the like. 
> 
> 
> Maybe you know how LifeCycleService can help me on that?
> 
> An instance, of a class an object must connect to a legacy server process on a 1 to 1
> relation. Each client (user) thread must hit in a 1 to 1 relation its related OpenVMS

> server process with each call inbetween login() and logout(). 
> 
> 
> A new session must create an instance, maintaining the state of an OpenVMS application.
> 
> In application scope I have only one instance of MyService.class maybe call it a singelton.

> 
> The instance of MyService.class is therefor used to detect new incomming session request,

> then create a UUID based session ID and a related Java Bean object and cache it under
its 
> UUID key in a ehcache. Through the Java Bean, talk via WSIT toolkit from HP to my OpenVMS

> Legacy Server Process.
> 
> This Java Beans are used as place- and state-holders for the OpenVMS process from
> login to logout.
> 
> 
> If you know how the LifeCycle Interface can realise and help on what I want then please

> explain? 

>>From the APIs I read: "When you want to initialize database
connections , starting threads and etc.. at the time you deploy  service
(similar to loadonstartup). You need to implement this interface and add
additional (optional) attribute into services.xml <service name="Foo"
class="Service life cycle impl class">"

Furthermore, here http://wso2.org/library/333 they say:
"Do not confuse service life cycle with session management. A session
itself has its own life cycle but the service life cycle is different
from that."

Try to see http://wso2.org/library/334  as well.
> 
> For your help, thank you very much
> Josef
> 
> 
> 
> 
Best,
Michele
> 
> 
> 
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> Gesendet: Montag, 5. März 2007 13:05
> An: axis-user@ws.apache.org
> Betreff: Re: AW: AW: [axis2] problem with service deployed in
> application scope
> 
> 
> Josef,
> 
> this is an old article indeed. As far as I know those two methods are
> not required any more because of the use of the ServiceLifeCycle
> interface.
> 
> For what concerns life cycle management, I've been using it since it was
> first made available and it works fine for me (my service is deployed in
> application scope).
> 
> Finally, are you sure your service does not throw any unchecked
> exception? I'm just asking because it it does a new service instance is
> created.
> 
> 
> Best,
> Michele
> 
> On Mon, 2007-03-05 at 12:32 +0100, Stadelmann Josef wrote:
> > I am not
> > happy too with this somehow outdated articel 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message