See the lines:
WorkingMemory workingMemory = ruleBase.newStatefulSession();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
Everything before those lines should be running on application start-up. i.e. Stored in
variables at the class level (as long as the class is not being disposed of after each
request.
Everything from that point on should be running per request. i.e. The session can be a
local variable in a request-handling method.
i.e. Your application may take a couple of extra seconds to start up while it loads and
compiles the knowledge base. However client requests will get a session in a couple of
milliseconds. Beyond that it’s just a question of how long your rules take to evaluate.
Steve
On 5 Nov 2013, at 12:36, MittalA <arpitmittal2000(a)gmail.com> wrote:
Hi Steve,
Thanks for the reply.
Can you please tell me how to use the existing knowledge base?
Secondly my issue is mainly about the first request to the
application..which is getting timed out from second request onward the
system is responding quick.
Thanks & Regards,
Mittal A
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-reduce-transaction-time-tp402663...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users