[rules-users] Override JPAWorkItemManager
Amin Mohammed-Coleman
aminmc at gmail.com
Wed Sep 7 03:02:40 EDT 2011
Hi
Thought it would make sense to show some code:
Properties prop = new Properties();
...
prop.put("drools.workItemManagerFactory", CustomJPAWorkItemManagerFactory.class.getName());
KnowledgeSessionConfiguration config = KnowledgeBaseFa ctory.newKnowledgeSessionConfiguration(prop);
JPAKnowledgeService.newStatefulKnowledgeSession(..,config,..);
The default JPAWorkItemManager factory is picked up every time. This is due to the session configuration containing 2 factories and the default is being pickedup.
Any help would be appreciated.
Cheers
Sent from my iPhone
On 7 Sep 2011, at 04:58, Mauricio Salatino <salaboy at gmail.com> wrote:
> are you sure that the property is being set in the right place? I always have troubles doing that. Did you try setting it up using the APIs? Just to see if your work item works?
> Cheers
>
> 2011/9/6 Amin Mohammed-Coleman <aminmc at gmail.com>
> Hi
>
> I am trying to set a custom jpa work item manager and setting it on the properties object before i create a knowledgesessionconfiguration with property "drools.workItemManagerFactory" but it seems as though the default JPAWorkItemManager is used every time. Is there a way to override this?
>
>
> Cheers
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> --
> - CTO @ http://www.plugtree.com
> - MyJourney @ http://salaboy.wordpress.com
> - Co-Founder @ http://www.jugargentina.org
> - Co-Founder @ http://www.jbug.com.ar
>
> - Salatino "Salaboy" Mauricio -
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110907/fca5785c/attachment.html
More information about the rules-users
mailing list