Re: [rules-users] Stateless session in drools server keeping classes around?

2014-02-12 Thread dunnlow
Hello, sorry, I do not remember if/how I resolved the issue.  I currently use
a persisted stateful session (Drools 5.5) retracting the facts I insert with
a rule with high salience and everything works fine.

I did bump into an issue recently where a rule with a bad mvel expression (a
variable in a regex matches that contained an invalid value) was causing an
exception in the bowels of mvel/drools and keeping my rule from firing that
retracts the objects I insert  (so eventually I'd run out of memory).  My
point: make sure you test with a simple / value rule.

hth.
-J



--
View this message in context: 
http://drools.46999.n3.nabble.com/Stateless-session-in-drools-server-keeping-classes-around-tp3583282p4028093.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Stateless session in drools server keeping classes around?

2011-12-13 Thread dunnlow
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-keeping-classes-around-tp3583282p3583282.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Stateless session in drools server keeping classes around?

2011-12-13 Thread Perrin John - jperri
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-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of dunnlow
Sent: Tuesday, December 13, 2011 1:05 PM
To: rules-users@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-keeping-classes-around-tp3583282p3583282.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@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.



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users