Hi,
Apologies if this is the wrong place to ask this and appreciate pointers to
a more appropriate forum.
I have a need to ask the service registry for a service but I want that
service created on-demand based on a configuration sent in (think host,
port, etc., where these necessary connections can't be known a priori).
Service factories *seem* to make sense, but the wording in the spec scares
me off of them ("must call methods on this object to create a unique
service object for each *distinct bundle that gets the service*"). Maybe
service hooks are the way to go? I'd really like to do this with DS as
well if possible.
The background for this is that we have a pre-remote services
implementation that used to be able to proxy returned interfaces via a
service (e.g. something like HostConnection.getConnection(String host, int
port) where HostConnection was an OSGi service that returned a Connection
interface object based on the arguments passed into getConnection() and
Connection could be proxied) Somewhere along the line we broke that and
base classes are needing to be serialized that can't be. My ideal scenario
is to simply ask for the service from the ServiceRegistry directly,
possibly using service properties? I also think that if I can get these
semantics to work I can toss out our implementation for something like ECF
instead.
Thanks for any pointers!
Cheers,
Craig
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev