[rules-dev] ResourceFactory: make setFactoryService() public?

Laird Nelson ljnelson at gmail.com
Mon May 23 15:43:57 EDT 2011


Would you consider making the setFactoryService() method in ResourceFactory be
public?

My Drools-as-a-JEE-compliant-resource-adapter project currently needs to
invoke this through a setAccessible() hack:
http://code.google.com/p/drools-jca/source/browse/trunk/drools-jca/src/main/java/com/google/code/drools/jca/DroolsResourceAdapter.java#319

This is because I'm attempting to (ultimately) override the usage of Threads
and re-express the asynchronous intent of the KnowledgeAgent by using
container APIs such as Timer, WorkManager, etc.

My project does this successfully, but I had to hack access to this method
to do it.

There is a constructor in ProcessChangeSet as well that I think should be
public.  Currently I get at it like this:

final Constructor<ProcessChangeSet> c =
ProcessChangeSet.class.getDeclaredConstructor(LinkedBlockingQueue.class,
ResourceChangeNotifierImpl.class, SystemEventListener.class);
assert c != null;
c.setAccessible(true);

Looking forward to the discussion,
Laird
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20110523/5dc00d57/attachment.html 


More information about the rules-dev mailing list