DS - example for factories? [message #108792] |
Thu, 24 April 2008 16:28 |
Tina Coleman Messages: 1 Registered: July 2009 |
Junior Member |
|
|
I'm seeking examples and explanations of the use of ComponentFactory and
ServiceFactory in DS, so that I can determine how to implement the use
described below. Any assistance, in either commenting on my use case, or
in pointing me to specific examples or documentation, would be most
appreciated. Thusfar my wade into section 112 (DS) of the OSGI spec
hasn't been illuminating.
My use case is that I want to implement N instances of a specific service,
which itself then iterates through M instances of a separate service
interface. Those M instances, although using the same services, will need
separate instances of those services.
E.g.,
* Thread A uses service X, Y, Z (of subset R-Z of service components
implementing a given interface).
* Thread B uses service X, Y, Z.
* The choice of X, Y, Z for the threads is configured at run-time from a
set of services that all implement the same interface.
* X, Y, and Z need to be separate instances of those services across A and
B.
Progress thusfar:
I've worked through Neil Bartlett's declarative services tutorials, and
have extended them such that I have a console that allows me to choose a
service or set of services based on properties configured on the services.
|
|
|
Powered by
FUDForum. Page generated in 0.03248 seconds