Are you using
// clean up after session
ksession.dispose();
We had the same symptoms before we started using dispose() to clean up the session.
Good luck,
John Perrin
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of dunnlow
Sent: Tuesday, December 13, 2011 1:05 PM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Stateless session in drools server keeping classes around?
Hi, I'm using drolls 5.3 server with one rule in a _stateless_ session. I am sending
a POJO to the server, having it check a few attributes, modify the attributes of the bean
as needed then return the result. I have this working and get back an execution results
object like I need.
The problem is that when I send the batch execution command to the server a number of
classes stick around with each call (as shown in jconsole).
Memory grows with each call until I run out. (I see garbage collection taking place so
that doesnt seem to be the problem - and if I stop sending events to the server, the
memory is never returned).
I figured with a stateless session I wouldnt need to worry about this, anyone have
thoughts about why this is happening? I am trying to do this quickly, and don't want
to call dispose/retract (the whole reason I'm using stateless).
knowledge-services.xml:
<drools:ksession id="ksession1" type="stateless"
kbase="kbase1"
node="node1"/>
my code that builds the command:
list cmds = new arraylist
InsertObjectCommand icmd = CommandFactory.newInsert(myBean)
icmd.setOutIdentifier("inserter")
icmd.setEntryPoint("DEFAULT")
cmds.add(icmd)
FileAllRulesCommand farc = new FileAllRulesCommand()
cmds.add(fileAllRulesCommand)
BatchExecutionCommand command =
CommandFactory.newBatchExecution(cmds,"ksession1")
..
As an aside, I also looked into setting the sequential mode to true to see if that helps,
but am still trying to figure out how to configure that via Spring.
Thanks for any insight,
-j
--
View this message in context:
http://drools.46999.n3.nabble.com/Stateless-session-in-drools-server-keep...
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
***************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.
If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.
If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.
Thank You.
****************************************************************************