<br><font size=2 face="sans-serif">Kris,<br>
</font>
<br><font size=2 face="sans-serif">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.</font>
<br>
<br><font size=2 face="sans-serif">Thanks for looking at this,</font>
<br>
<br><font size=2 face="sans-serif">Alan</font>
<p>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Kris Verlaenen <kris.verlaenen@cs.kuleuven.be></b>
</font>
<p><font size=1 face="sans-serif">26/08/2009 10:40</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Rules Users List <rules-users@lists.jboss.org>,
Alan.Gairey@tessella.com</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [rules-users] When is JPAWorkItemManager
used in Drools Flow?</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>Alan,<br>
<br>
The JPAWorkItemManager should be used instead (automatically) as it is<br>
defined in the session configuration properties (earlier in the same<br>
method):<br>
props.setProperty( "drools.workItemManagerFactory",<br>
"org.drools.persistence.processinstance.JPAWorkItemManagerFactory"
);<br>
<br>
Are you encountering problems where the JPAWorkItemManager is not being<br>
used?<br>
<br>
Kris<br>
<br>
<br>
Quoting Alan.Gairey@tessella.com:<br>
<br>
> I've been doing some testing recently with the 5.1 snapshot of Drools<br>
> <br>
> (build 3280). The JPA state persistence in Drools Flow appears to
be<br>
> much <br>
> more solid (no more NullPointerExceptions) - many thanks for this.<br>
> One question I still have though is with the loading of existing<br>
> sessions <br>
> from the database; the loadStatefulKnowledgeSession method of class
<br>
> JPAKnowledgeServiceProviderImpl ultimately creates an instance of
<br>
> CommandBasedStatefulKnowledgeSession to encapsulate the session<br>
> state. <br>
> However, this class uses an anonymous local class for its work item
<br>
> manager. I would have expected JPAWorkItemManager to have been used
<br>
> instead, so that all the existing work items are also read back into<br>
> <br>
> memory from the database. Or am I missing something? As it is, I have<br>
> to <br>
> explicitly use an EntityManager to do this.<br>
> Thanks,<br>
> Alan<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
<br>
<br>
<br>
<br>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm<br>
</font></tt>
<br><font size=2 face="sans-serif"><br>
<br>
<br>
<br>
<br>
<br>
</font>