[rules-dev] configuring timer service (and persistence)

Jordi Alvarez jalvarezc at gmail.com
Tue May 3 11:34:43 EDT 2011


Hello, I am involved in a project in which we are using Drools Flow 5.1.1.
as the underlying BPM.

We have drools integration with Spring. We are using JPA+Spring+Drools
integration, and have setup the knowledge base and stateful session as
indicated in the drools spring integration documentation. Our BPM has
external clients that call adaptor methods for Drools. That is, drools is
never used in a direct way from an external client. We use this strategy in
order to provide some additional behaviour and also in order to provide
transactional behaviour as it is usually made with Spring.

We needed to partially apply the patch reported at the end of:

http://drools.46999.n3.nabble.com/5-1-0-CR1-Drools-Spring-Configuration-Changed-td997130.html
*

"3.* Interesting thing is that I have to recreate "Environment" now every
time before reloading the Session, otherwise the entityManager is closed,
and it does not respond to a simple Spring AOP TM wrapping... But that is
another issue.. "

We still have some persistence problems when using drools Timers. The
problems arise when drools creates the transaction itself. We do have some
listeners which persist some information in our own tables. For this reason
and also some others (as reported in
http://drools.46999.n3.nabble.com/Drools-5-1-Flow-in-a-quot-Clustered-quot-environment-td1780463.html),
we would like to configure the timer service used

internally by Drools.

Looking at drools source code, it seems that it should be possible, since a
defult implementation is provided by drools (JDKTimerService and
JpaJDKTimerService if persistence is used). For example, class *
KnowledgeStoreServiceImpl* seems to define a set of default services (which
could pressumably be overriden someway). Nevertheless, after looking to that
for a while we have found no specific documentation and no clear way to do
that for our Spring integration.

Is there a way to change the TimerService implementation provided by Drools?

Any help is appreciated.

Thanks very much in advance!
Jordi Alvarez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20110503/58b74ef1/attachment.html 


More information about the rules-dev mailing list