Hi all,

 

I am new to Servicemix and OSGi therefore sorry for a probably stupid
question.

Do I understand correctly that a service within a Servicemix container
is in essence a single object instance serving a given contract
(interface[s])?

I mean, is that correct that it is not possible (by design) to obtain a
new service object instance by each call to a BundleContext.getService()
<http://www.knopflerfish.org/releases/current/docs/javadoc/org/osgi/fram
ework/BundleContext.html#getService(org.osgi.framework.ServiceReference)
> ?

As I understand, according to this tutorial article:
http://www.knopflerfish.org/osgi_service_tutorial.html this is not
possible.

At maximum, I get can a list of service objects registered in the
container and select a needed one by myself or I can get a separate
service object "per bundle", but I cannot make the service factory to
instantiate a new service instance every time my bundle wants to call
it?

 

Best Regards,

Sergey Shcherbakov.

Reply via email to