[jbpm-dev] services registered by OSGi bundle activators of Kie, Drools and Jbpm are still needed ?

Kris Verlaenen kverlaen at redhat.com
Mon Aug 18 06:28:37 EDT 2014


Cristiano,

Cristiano Gavião schreef op 15/08/2014 17:02:
> Hi,
>
> has a long time that I don't play with Drools and JBPM source code. This
> week I was walking through them again and saw a lot of new elements,
> interfaces and new ways to setup things.
>
> I saw that some Blueprint specific annotations and classes were created
> (kie-aries-blueprint).
> But the existent osgi activators are still registering some services
> that seems not be appropriated anymore. at least they are different from
> the set of elements in blueprint namespace (environment, kmodule, kbase
> and others ) that I saw.
>
> For example, in activator of drools-core we have a
> KnowledgeBaseFactoryServiceImpl being registered. in drools-compiler we
> have KnowledgeBuilderFactoryServiceImpl being registered.
>
> I can't use blueprint, so I need to figure out what is the best setup
> workflow for OSGi and get the proper services registered.
>
> Question, is the kie-aries-blueprint.xsd reflecting the actual state of
> kie, drools and jbpm core setup workflow, so I can use it as start point?
>
> could someone check that and give me a feedback ?
It is true that using factories isn't always trivial in OSGi, so the 
activators you are referring to are used (internally) to do additional 
registration for OSGi.  They should be working and are required when 
using OSGi.

On top of this, some additional "sugar" was created that allows you to 
more easily define various elements (kbase, env, etc.) so they can be 
injected more easily.  You are free to use these, but this is not 
required, you could initialize these elements yourself using pure Java 
as well for example.  Afaik, kie-aries-blueprint.xsd should be up-to-date.

There are some osgi examples available here:
https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-osgi/drools-karaf-itest/src/test/java/org/drools/karaf/itest/KieSpringOnKarafTest.java

Kris


More information about the jbpm-dev mailing list