Maybe you should explain what jbpm is?

Kind regards,

        Peter Kriens

On 12 jun 2009, at 11:04, Andrea Zoppello wrote:

Hi all,

In these day i'm trying to understand which is the best way to use an OSGi service by an object that is
not directly managed by container.

I need this because basically i want use jbpm to call osgi-services ( using custom-handler class ). The problem is that jbpm custom action handler classes are managed by jbpm as well and not by osgi.

So i need a way to get an handle to the osgi services inside the custom handler class, but on the other side this is managed by jbpm so i cannot pass the bundle context so to use a service tracker..

One solution i've find is to use an activator that has a service tracker for the OSGi Services that i want to use in my jbpm custom handler class and to expose by the activator a static method to get the service i'm interested to. I've declared the ServiceTracker as static... and i've initialized this in the start method of my activator.
Is there any problem having the service tracker declared static????

With this trick my custom handler class get the OSGi service using a static method on the activator class...

I don't like too much that solution but i have not found a better one...

Is there any way to handling better such type of thing??? Any idea??

Thanks

Andrea Zoppello



_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to