Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » OSGi ManagedServiceFactory understanding
OSGi ManagedServiceFactory understanding [message #105922] Thu, 06 March 2008 14:10 Go to next message
Philipp Kursawe is currently offline Philipp KursaweFriend
Messages: 135
Registered: July 2009
Senior Member
Hello,

I wonder if something like the following scenario is possible with
ManagedServiceFactory.

I have to call a remote function and this function object is provided by
a function pool. In my program I want only create a
RemoteFunction("SOME_NAME") and call its RemoteFunction.execute() method.

Internally the RemoteFunction object is created from the currently
active FunctionPool if there is one. Otherwise its constructor would
throw an exception. There can be any number of FunctionPools registered
in the system with only one being active. The user of the RemoteFunction
object should not have to worry if there is an active FunctionPool.

My understanding is that ManagedServiceFactory could provide such a "on
demand" service creation?

Thanks for any thoughts,
Phil
Re: OSGi ManagedServiceFactory understanding [message #105935 is a reply to message #105922] Fri, 07 March 2008 01:36 Go to previous messageGo to next message
Xiang Qinxian is currently offline Xiang QinxianFriend
Messages: 119
Registered: July 2009
Senior Member
Hi,

Hope I caputer it correctly.
Supposed A function pool be actived by invocation of remote function
call, which can give a some style key, and the key indicate which pool
should be active.
So the function pool can be mananged by cm.
the managed service can be updated and activate the target pool.
Seems no problem.

But IMO the true problem is that you must worry about the concurrency
with the remote calls. it's a true concurrency.

In my mind, I would use cm in a frequency changing case, but a relative
long-time lifecycle service management.
In the scenario you discribed, I prefer to make a Map<Map<Pool>> service
for the remote invocation dispatch.

Regards,
Xiangya

Philipp Kursawe 写道:
> Hello,
>
> I wonder if something like the following scenario is possible with
> ManagedServiceFactory.
>
> I have to call a remote function and this function object is provided by
> a function pool. In my program I want only create a
> RemoteFunction("SOME_NAME") and call its RemoteFunction.execute() method.
>
> Internally the RemoteFunction object is created from the currently
> active FunctionPool if there is one. Otherwise its constructor would
> throw an exception. There can be any number of FunctionPools registered
> in the system with only one being active. The user of the RemoteFunction
> object should not have to worry if there is an active FunctionPool.
>
> My understanding is that ManagedServiceFactory could provide such a "on
> demand" service creation?
>
> Thanks for any thoughts,
> Phil
Re: OSGi ManagedServiceFactory understanding [message #105949 is a reply to message #105935] Fri, 07 March 2008 11:42 Go to previous message
Philipp Kursawe is currently offline Philipp KursaweFriend
Messages: 135
Registered: July 2009
Senior Member
Thanks for your response, Qinxian!

Maybe I should explain again what I am trying to do in a simpler way,
since it may not even have to do with ManagedServiceFactory.
I have 0..n configurations in the system (I suppose as services much
like an ApplicationDescriptor). Those configurations describe connection
settings. Based on one of those configurations there should be a
Connection service created. So in the system is running 0..1 Connection
Service that can be used. When this Connection Service's configuration
is changed it should reconnect itself. When another Connection
Configuration is made active the current Connection Service is updated
with this Connection settings, or if there is no Connection Service in
the system on is created base on the Connection settings selected.

I think this might be even more an issue for Declarative Services as one
could register n Connection Configurations in the system and then by
preferences, console command or other means activate a Connection
Configuration which would then spawn a new Connection Service in the
system. Users that need to be informed about a Connection Service
becoming available can be notified by Depencency Injection.

Any thoughts?
Phil
Previous Topic:bundles on first startup are always started automatically!?
Next Topic:[OSGi services] Connection configurations as services with a Connection Service consuming them
Goto Forum:
  


Current Time: Tue Oct 26 09:56:39 GMT 2021

Powered by FUDForum. Page generated in 0.02286 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top