John,
I've passed sometime evaluating 6.x for equinox some months
ago. We end up given up to use it in current project because
we found lot of these classloading issues in that time. almost
all examples failed to run as is...
I heard that some guys could setup JBPM fine (just a couple of
smoke tests was done, actually) using blueprint. but as I
think blueprint is too much heavy for my needs (I use DS
instead) I didn't take a look, yet...
Just to anticipate your team, the major problem that
identified was the Factory architecture being used by Drools,
Kie and etc. They was planned to work with java SE
flat
classpaths... in they world, developer just need to put the
needed jar in a place where java could find it... but we know
that is not the reality in the OSGi world.
Take a look on this KieServices class [1]. that is one of the
most used class that I could see in the examples provided by
drools.
Observe that this class exists in bundle Kie-API and in the
line 165 will try to instantiate another class that exists in
the "
org.drools.compiler" bundle and worst, using
Class.forName().
You will find sentences like this everywhere in source code...
And you won't see any integration tests for each of them...
As you could note, this breaks OSGi modular concept, and could
be the origin of the classloading issues your team are
facing...
I heard that some people could "bypass" those errors patching
the manifest generation for :
A) to add an import package from the Implementation bundle
inside the API bundle ! :( that is crap
B) or to add a Dynamic Import-Package [2].
I had negative experiences with Dynamic Import-Package when I
tried to use Hibernate in OSGi many year ago (too many issues
that we lost confidence and moved to gemini + eclipselink).
So, I'm in
skeptical with its use in
Drools/JBPM 6, too.
One solution would be the use of JDK's ServiceLoader api [3]
and the SPI spec in osgi side, but I have doubts that the team
would buy for this route... :)
anyway, good luck and let us know about your team experiments.
[1] -
https://github.com/droolsjbpm/droolsjbpm-knowledge/blob/master/kie-api/src/main/java/org/kie/api/KieServices.java#L165
[2] -
http://keheliya.blogspot.com.br/2013/02/use-of-dynamicimport-package-in-osgi.html
[3] -
http://docs.oracle.com/javase/tutorial/ext/basics/spi.html#the-serviceloader-class)
best regards,
Cristiano
On 16/12/13 10:10, John Shooab wrote:
Hi Mauricio,
I could see that many issues were resolved in Drools and
JBPM Jira, that is really good.
The system environment where we plan to use JBPM is Equinox.
So, what concerned we most are the issues that wasn't raised
yet related running 6.x into OSGi.
In one entire day one of my team members wasn't able to make
it run. I can't specify the problems right now because he
got out for vacation without pass me the report file. But
seems that it was related to classloading issues...
I asked to someone to repeat his procedure this week again
and we will raise the issues, if necessary...
regards,
John
On 16/12/13 09:22, Mauricio Salatino wrote:
HI John,
If you can highlight which issues that you see there
are important to you please let us know. We are still
cleaning Jira for the last release so some of them are
already fixed or not relevant.
Cheers