Ah, seems to be a classloader issue (surprise).
Hmm, not sure how to work around this.
So I have my Drools resource adapter (http://code.google.com/p/drools-jca/
and I have the KnowledgeBase that it produces injected as a @Resource into a
stateless session bean:
private KnowledgeBase kb;
So the resource adapter, under whatever classloader it's under, reads in my
rules file and compiles the KnowledgeBase. Let's say this is classloader A.
Then, at bean invocation time, I ask this kb to give me a new
StatefulKnowledgeSession. It's here that I call setGlobal(), and pass it a
reference to another EJB. This is all happening under the auspices of
Now, Drools takes this global and evaluates it against the declared type--in
the rules file--of the global "slot" it's supposed to fill. I can only
assume that classloader A is loading up the global type declaration and
classloader B is supplying the global itself. Consequently, the supplied
global is NOT an instance of classloader A's version of the interface.
Rats; this will take some work.
View this message in context:
Sent from the Drools - Dev mailing list archive at Nabble.com