[rules-users] When is JPAWorkItemManager used in Drools Flow?

Alan.Gairey at tessella.com Alan.Gairey at tessella.com
Wed Aug 26 05:48:16 EDT 2009


Kris,

As far as I can see, JPAWorkItemManager isn't used. When 
loadStatefulKnowledgeSession is called in class 
JPAKnowledgeServiceProviderImpl, a new instance of 
CommandBasedStatefulKnowledgeSession is returned. If you look at the 
getWorkItemManager method of this class, it returns an instance of an 
anonymous local class - it doesn't appear to be reading the property to 
determine which work item manager factory to use.

Thanks for looking at this,

Alan




Kris Verlaenen <kris.verlaenen at cs.kuleuven.be> 
26/08/2009 10:40

To
Rules Users List <rules-users at lists.jboss.org>, Alan.Gairey at tessella.com
cc

Subject
Re: [rules-users] When is JPAWorkItemManager used in Drools Flow?






Alan,

The JPAWorkItemManager should be used instead (automatically) as it is
defined in the session configuration properties (earlier in the same
method):
props.setProperty( "drools.workItemManagerFactory",
"org.drools.persistence.processinstance.JPAWorkItemManagerFactory" );

Are you encountering problems where the JPAWorkItemManager is not being
used?

Kris
 

Quoting Alan.Gairey at tessella.com:

> I've been doing some testing recently with the 5.1 snapshot of Drools
> 
> (build 3280). The JPA state persistence in Drools Flow appears to be
> much 
> more solid (no more NullPointerExceptions) - many thanks for this.
> One question I still have though is with the loading of existing
> sessions 
> from the database; the loadStatefulKnowledgeSession method of class 
> JPAKnowledgeServiceProviderImpl ultimately creates an instance of 
> CommandBasedStatefulKnowledgeSession to encapsulate the session
> state. 
> However, this class uses an anonymous local class for its work item 
> manager. I would have expected JPAWorkItemManager to have been used 
> instead, so that all the existing work items are also read back into
> 
> memory from the database. Or am I missing something? As it is, I have
> to 
> explicitly use an EntityManager to do this.
> Thanks,
> Alan
> 
> 
> 
> 
> 
> 




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm







-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090826/a6072bb4/attachment.html 


More information about the rules-users mailing list