Thanks for answer, I wasn't able to use ExternalExectorService directly, as it would have to be made into ScheduledExecutorService. If it implemented ScheduledExecutorService interface, it could be a matter of adding new constructor to JdkTimerService. Meanwhile, I'm attaching my current, a bit simplist http://www.nabble.com/file/p26056150/ExternalTimerService.java ExternalTimerService.java ic implementation (big part of code is a bit refactored code from JdkTimerService)
br, maciek Edson Tirelli-4 wrote: > > Maciek, > > I did not made the implementation pluggable yet due to the > complexities > involved in the implementation of new clocks and the fact that interface > could still change. Particularly, I would like to have a couple more > implementations done (including the heart beat based clock and the fact > attribute based clock) before I know that the interface is stable enough > to > enable pluggability. > > Meanwhile, if you would like to contribute your implementation I would > happily add it to the drools codebase and release it in the next version. > It > will certainly help towards the stabilization of the interface. > > Finally, I am working on a more controllable thread pool wrapper, so > that we can plug external thread pools into Drools. Check the > ExternalExecutorService implementation and its uses. Maybe what we need is > to have your implementation also use that. Suggestions welcome. > > Edson > > > 2009/10/22 Maciej Prochniak <[email protected]> > >> Hello, >> >> are there any unintrusive (without recompiling in drools-core ;)) ways >> to plug own implementation of TimerService? >> Currently configuration is based on enumeration ClockType, which is >> >> It would be nice to be able to pass any object implementing >> TimerService, or some factory class. >> >> One of the reasons is that I'd like to have more control over thread >> pool used by JdkTimerService. Current implementation allows for >> unlimited number of threads, it's also not possible to share thread pool >> between different KnowledgeSessions >> >> thx for reply & br >> maciek >> >> _______________________________________________ >> rules-dev mailing list >> [email protected] >> https://lists.jboss.org/mailman/listinfo/rules-dev >> > > > > -- > Edson Tirelli > JBoss Drools Core Development > JBoss by Red Hat @ www.jboss.com > > _______________________________________________ > rules-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-dev > > -- View this message in context: http://www.nabble.com/Plugging-custom-TimerService-tp26008771p26056150.html Sent from the drools - dev mailing list archive at Nabble.com. _______________________________________________ rules-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-dev
