If I understood your question,
Drools 4 -> use "from" to load them on demand for your rules
Drools 5 -> you can do the same, or create a session, pre-load it and serialize it to disk or an in-memory binary cache... now, for each request from your application, instead of creating a new session, de-serialize the session from your disk (or in-memory cache) and use it. Please note that you are doing nothing more than clone-by-serialization for the preloaded session, if you use this strategy.
[]s
Edson
2008/10/13 David Sinclair
<dsinclair@chariotsolutions.com>
I have a question concerning facts. I have a service based application
XML IN -> Business Objects -> Rule Processing -> Business Objects -> XML OUT
Pretty straightforward.
In the rule processing I will lazily load objects into WorkingMemory that drive some of the business rules. For instance, if a new Windows Server(Business Object) is installed, ensure its OS is only Windows Server 2007 (lazily loaded DB object).
What I would like to do is be able to either preload the working memory with this data, or preferably, lazily load the data. So my question is how do you place facts into working memory when you create a new session each time without having to assert them everytime? Or this that a stupid question...Should the question be, since working memory/sessions aren't thread safe, i.e. one can't be shared by everyone, what is the best way to place long lived facts into memory of all sessions?
thanks
dave
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @
www.jboss.com