I’d be really amazed if this worked. I imagine that DM is quite similar to DS,
and you definitely can’t do that in DS, you have to use the scope rather than
trying to write your own serviceFactory or PrototypeServiceFactory. If your
service is e.g. ServiceFactory that’s what you’ll get when
I'm fairly certain that DM supports publishing services of any type and
doesn't care about scoping, including implementations of
PrototypeServiceFactory.
Mdu, your service simply needs to implement PrototypeServiceFactory and you
should be able to use the DM's imperative API as usual.
But any
Ray/David,
Thanks for your prompt responses. I would like to accomplish this using
API/Activator approach in DM4 (Felix Dependency Manager 4). Here's the
context within which I would like to do this:
public class Activator extends DependencyActivatorBase {
@Override
public void
I think he wants something like DS’s prototype scope in DependencyManager 4…..
I don’t know if it’s available.
david jencks
> On Aug 24, 2016, at 12:02 PM, Raymond Auge wrote:
>
> On Wed, Aug 24, 2016 at 2:17 PM, mduduzik
On Wed, Aug 24, 2016 at 2:17 PM, mduduzik wrote:
> I would like to create and new instance of component for every service
> request. I believe by default a component is a singleton - i.e. the same
> instance will be returned for every service consumer request. In DS/SCR,
With regards to DS, I think you might be confusing factory component (where you
get instances of your component by calling
componentFactoryService.newInstance(…)) with prototype scope (where you can use
a ServiceObjects.getService() call to obtain a new instance of the service for
each call).
I would like to create and new instance of component for every service
request. I believe by default a component is a singleton - i.e. the same
instance will be returned for every service consumer request. In DS/SCR,
this is accomplished by using a factory property in @Component declaration.
Btw:
@Resource(lookup = "java:app/osgi/Bundle")
Bundle activatorBundle;
public T getService(Class serviceInterface) {
return activatorBundle.getBundleContext()
.getService(activatorBundle.getBundleContext().getServiceReference(serviceInterface));
}
-Original
Hi Guys
As you know by now, I wrap an osgi application into a j2ee web app on Weblogic.
Weblogic uses felix.
I can successfully deploy the app and communicate on sockets with it, all fine.
But when it comes to accessing the app using the OSGI Services, I can call a
few methods. However, as
9 matches
Mail list logo