hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Laberov <ig...@qlusters.com>
Subject Re: Swap implementation during program running
Date Mon, 02 May 2005 14:21:58 GMT
Hi Johan, I'm not sure that I understood you. 
Lets see in example:
Let's say that I have service that defined by interface MyInterface. So
the scenario is following:

Thread 1:
MyInterface my =
registry.getService(MyInterface.class,"myModule.impl1");
my.invoke1();
...
Here I want to replace the implementation ("myModule.impl1") of
MyInterface by new jar that contains next version. After that I suppose
that should be called something like builder.processModule()(?) that
will re-read the descriptor file

Then,in Thread 2:
MyInterface my =
registry.getService(MyInterface.class,"myModule.impl1");
Now the question: is it possible to get here object that is created on
new-version class? (event if this service was defined as singleton)

(When Thread 1 continues to invoke 'my' it will continue to use old
version)

I hope my question is bit clear now,
Thanks,
Igor

 
On Mon, 2005-05-02 at 17:03, Johan Lindquist wrote:
> Igor, no way of doing that unfortunately - all setup is done at registry  
> time.  You could use your own proxy that relies on you setting up the  
> instance you want to invoke i guess ..
> 
> johan
> 
> On Mon, 02 May 2005 16:00:17 +0200, Igor Laberov <igorl@qlusters.com>  
> wrote:
> 
> > Hi all,
> > What is the way to replace service implementation without application
> > restart, i.e. how to replace service implementation in the registry, so
> > next time when I request the service, new implementation object will be
> > created (even if was defined as singleton)?
> >
> > Thank you,
> > Igor Laberov
> > Qlusters, Inc.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
> 
> 
> 
> -- 
> you too?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 



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


Mime
View raw message