Re: [rules-users] drools-example-brms
It´s the same, it don´t run. I forgot to say i´m running it on tomcat, could be it the problem? thanks ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] drools-example-brms
I did it and i got the same, i forgot to say i´m running it on Tomcat 5.5 could it be the problem? Thanks. Fernando Meyer Camargo wrote: use double \ in your config. file ex. D:\\workspace2\\drools-example-brms\\cache Fernando Meyer http://fmeyer.org [EMAIL PROTECTED] PGP: 0xD804DDFB On Jul 19, 2007, at 9:31 AM, David Nogueras wrote: Hi, I´m trying to run the brms sample and i get the next output: RuleAgent(insuranceconfig) INFO (Thu Jul 19 14:27:44 CEST 2007): Configuring with newInstance=true, secondsToRefresh=30 RuleAgent(insuranceconfig) INFO (Thu Jul 19 14:27:44 CEST 2007): Configuring package provider : URLScanner monitoring URLs: http:// localhost:8080/drools-jbrms/org.drools.brms.JBRMS/package/ org.acme.insurance/David2 with local cache dir of D:\workspace2 \drools-example-brms\cache RuleAgent(insuranceconfig) WARNING (Thu Jul 19 14:27:44 CEST 2007): Falling back to local cache. java.lang.NullPointerException at org.drools.agent.FileScanner.readPackage(FileScanner.java:101) at org.drools.agent.FileScanner.getChangeSet (FileScanner.java:79) at org.drools.agent.FileScanner.loadPackageChanges (FileScanner.java:57) at org.drools.agent.URLScanner.loadPackageChanges (URLScanner.java:93) at org.drools.agent.RuleAgent.checkForChanges (RuleAgent.java:291) at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:259) at org.drools.agent.RuleAgent.configure(RuleAgent.java:228) at org.drools.agent.RuleAgent.init(RuleAgent.java:160) at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:169) at org.acme.insurance.launcher.InsuranceBusiness.loadRuleBase (InsuranceBusiness.java:26) at org.acme.insurance.launcher.InsuranceBusiness.executeExample (InsuranceBusiness.java:14) at org.acme.insurance.launcher.MainClass.main(MainClass.java:13) could someone help me? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://www.nabble.com/drools-example-brms-tf4110522.html#a11702935 Sent from the drools - user 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] Loading more than 10000 rules
Title: RE : [rules-users] Loading more than 1 rules Hello, I have turn JVM memory up to 1GB. In fact, what happens is that I load the rules 500 per 500. everything goes fine and per 1000 rules, it takes 30 MB in RAM. And time is constant between two loading. And at 1, nothing happens (processor is at 90% for the jvm) and then after some times, the jvm goes out of memory. I will make sample project this afternoon and send it on this list. Thanks Nicolas Message d'origine De: [EMAIL PROTECTED] de la part de Michael Neale Date: ven. 20/07/2007 06:21 À: Rules Users List Objet : Re: [rules-users] Loading more than 1 rules If you see the error out of PermSpace you can increase perm space. Another strategy, is to build the rules, in chunks, say 1000 at a time, take the Package object, and *then* add it to the rulebase. That may make it easier. You will need more then the default space on the heap for this I would expect. On 7/20/07, Héron Nicolas [EMAIL PROTECTED] wrote: Hello, I am using drools 3.0.6 for a retail customer. We have the current problem that we can not add more than 1 rules. After this, the system increases its memory and runs out of memory. Is there a limit ? Thanks Nicolas Heron ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE : [rules-users] Loading more than 10000 rules
Title: RE : [rules-users] Loading more than 1 rules Hello, I have turn JVM memory up to 1GB. In fact, what happens is that I load the rules 500 per 500. everything goes fine and per 1000 rules, it takes 30 MB in RAM. And time in constant between two loading. And at 1, nothing happens (processor is at 90% for the jvm) and then after somme times, the jvm goes out of memory. I will make sample project this afternoon and send it on this list. Thanks Nicolas Message d'origine De: [EMAIL PROTECTED] de la part de Edson Tirelli Date: jeu. 19/07/2007 18:26 À: Rules Users List Objet : Re: [rules-users] Loading more than 1 rules Heron, There is no hard limit on rules, but you may need indeed to tune jvm configuration to be able to handle such number of rules. Are you running out of permgen? What are your memory settings? In your use case, must all the 1 rules be in the same rulebase? Is it possible to partition the rules into multiple rulebases? []s Edson 2007/7/19, Héron Nicolas [EMAIL PROTECTED]: Hello, I am using drools 3.0.6 for a retail customer. We have the current problem that we can not add more than 1 rules. After this, the system increases its memory and runs out of memory. Is there a limit ? Thanks Nicolas Heron ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3529-6000 Mobile: +55 11 9287-5646 JBoss, a division of Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Re: [Resolved] JBossRules and JAVA Servlet / JSP
hello, Thank you all for your replays; as you've suggested, what i should import into my build path was not the core and compiler but all the set contained in the drools library, maybe that would help someone later! here is the list of jars antlr-runtime.jar drools-compiler.jar drools-core.jar drools-decisiontables.jar drools-documentation.jar drools-jsr94.jar jsr94.jar junit.jar jxl.jar mvel14.jar xercesImpl.jar xml-apis.jar xpp3.jar xstream.jar Thankyou Mark for the link with kind regards, ps: tried many times to post this mail yesterday but seems that it doesn't work, sorry if you received it more than once! Mohammed JBossRules wrote: Hello, I'm a new user for JBossRules, and I'm feeling like turning around since a while, so i thought that sole body could help... I'm using JBossRules(V4.0.0.12865MR3) on eclipse (Version: 3.3.0 Build id: I20070621-1340) on MS-Windows XP and Java(TM) SE Runtime Environment (build 1.6.0_01-b06) now the problem is how to use my rules (simple rules in a DRL file) in a dynamic project based on JSP/Servlets... i've imported the compiler, the core, jsr94, decisiontable, and also the core 3.2.3 jars to my build path , but when i try to execute the same code i'm having errors like: The import org.drools cannot be resolved but i have imported the core!! what's wrong? help please regards ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using Rule Flow
Mark, Are the latest examples updated to http://labs.jboss.com/jbossrules/downloads under the MR3 Examples downloadable. Thanks Natraj On 7/19/07, Mark Proctor [EMAIL PROTECTED] wrote: I have just updated conways game of life example to use ruleflow, the agenda group one still exists. So execute ConwayAgendaGroupRun and ConwayRuleFlowGroupRun to run the two examples. AgendaGroupDelegate and RueFlowDelegate show the two different implementations. Mark Natraj Gudla wrote: Hi, Has any one used Rule FLow with 4.0.0. I am looking for some help on how to use rule flow, where to mention the drl file name. How to use it in the java invoker classes. I have tried something, created a TestRuleFlow.rf, then added a rule group, gave it a group name as drl file name. When i use the PackageBuilder to add the rule flow, it throws the following exception * com.thoughtworks.xstream.alias.CannotResolveClassException *: org.drools.ruleflow.core.impl.RuleFlowProcess : org.drools.ruleflow.core.impl.RuleFlowProcess at com.thoughtworks.xstream.mapper.DefaultMapper.realClass( *DefaultMapper.java:35*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.XmlFriendlyMapper.realClass( *XmlFriendlyMapper.java:44*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass( *ClassAliasingMapper.java:49*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass( *DynamicProxyMapper.java:46*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.ArrayMapper.realClass( *ArrayMapper.java:70*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.CachingMapper.realClass( *CachingMapper.java:27*) at com.thoughtworks.xstream.core.TreeUnmarshaller.start( *TreeUnmarshaller.java:95*) at com.thoughtworks.xstream.core.ReferenceByIdMarshallingStrategy.unmarshal( *ReferenceByIdMarshallingStrategy.java:12*) at com.thoughtworks.xstream.XStream.unmarshal( *XStream.java:552*) at com.thoughtworks.xstream.XStream.unmarshal( *XStream.java:540*) at com.thoughtworks.xstream.XStream.fromXML( *XStream.java:490*) at org.drools.compiler.ProcessBuilder.addProcessFromFile( *ProcessBuilder.java:76*) at org.drools.compiler.PackageBuilder.addRuleFlow( *PackageBuilder.java:199*) at com.drools.sample.ParseDRL.readRuleFromDrl( *ParseDRL.java:72*) at com.drools.sample.ParseDRL.main( *ParseDRL.java:23*)* com.thoughtworks.xstream.alias.CannotResolveClassException *: org.drools.ruleflow.core.impl.RuleFlowProcess : org.drools.ruleflow.core.impl.RuleFlowProcess at com.thoughtworks.xstream.mapper.DefaultMapper.realClass( *DefaultMapper.java:35*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.XmlFriendlyMapper.realClass( *XmlFriendlyMapper.java:44*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass( *ClassAliasingMapper.java:49*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass( *DynamicProxyMapper.java:46*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.ArrayMapper.realClass( *ArrayMapper.java:70*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( *MapperWrapper.java:18*) at com.thoughtworks.xstream.mapper.CachingMapper.realClass( *CachingMapper.java:27*) at com.thoughtworks.xstream.core.TreeUnmarshaller.start( *TreeUnmarshaller.java:95*) at com.thoughtworks.xstream.core.ReferenceByIdMarshallingStrategy.unmarshal( *ReferenceByIdMarshallingStrategy.java:12*) at com.thoughtworks.xstream.XStream.unmarshal( *XStream.java:552*) at
[rules-users] FunctionFixer breaks valid consequence
Hi everybody We use Drools 3.0.6 as part of a rule framework and directly generate description objects (PackageDescr, RuleDescr, etc.). Today a rule showed up which cannot be compiled, because the FunctionFixer utitly generates garbage of our consequence. The consequence is varlist.setDouble(a, (7 / 2) + 1);, varlist is just a fact with a function taking a string and a double. The fix method in FunctionFixer.java chops this consequence into varlist.setDouble(a,.,(7 / 2) + 1); If we slightly modify the consequence, e.g. to varlist.setDouble(a, 7 / 2);, everything works perfect. We actually do not want any 'fixes', as we do not use any DSL or other high-level stuff. Is there a way to bypass theses fixes without modifying the source code? Thanks in advance, Lukas ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Fwd: [rules-users] Predicate expression effect on performance
(there is definetely a problem posting to this list) -- Forwarded message -- From: Yuri de Wit [EMAIL PROTECTED] Date: Jul 20, 2007 7:22 AM Subject: Fwd: [rules-users] Predicate expression effect on performance To: Rules Users List rules-users@lists.jboss.org forgive the (possible) double posting, but often posts take a while to show up -- Forwarded message -- From: Yuri de Wit [EMAIL PROTECTED] Date: Jul 20, 2007 1:17 AM Subject: Re: [rules-users] Predicate expression effect on performance To: Rules Users List rules-users@lists.jboss.org (sorry, the OR was not part of the sample rule: I was just considering the same rule written in two different ways) I am seeing a considerable performance problem with my rules and I am trying to narrow down why. I have a small number or rules but hundreds of thousands of facts. At first the assertion goes very fast but it quickly degrades as more facts are asserted. I already reordered the predicates (I have between 8-12 predicates in most rules and reordered them more restrictive first) and saw some improvements, but not nearly enough. Then thought about to what extent predicate expressions where hitting me. Per what you say that cant be the reason. If Check is updated (as you mentioned) would that be equivalent to reasserting it into memory? I keep a status as a property of Check that get updated somewhat often. thanks, On 7/20/07, Michael Neale [EMAIL PROTECTED] wrote: In a sense, yes - but its the result of the comparison that is cached really. In the case you described, it is subrule generation. So either side of the or is like a separate rule. In version 3, the result of isSameAmount (ie if it was true or false) is cached. Things will only be re-checked if the Check fact changes (and the engine knows about the change). Note that this checking happens as you are asserting objects, not when you fireAllRules necessarily. On 7/20/07, Yuri de Wit [EMAIL PROTECTED] wrote: What is the extent of the performance impact caused by using predicate expressions? Check( amount == $amount ) or Check( $amt : amount - (isSameAmount($amt, $amount) ) My understanding is that once asserted the amount property will be cached in the shadow fact, is the result of isSameAmount(...) also cached? thanks, -- yuri ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using Rule Flow
No it's in trunk, see my blog: http://markproctor.blogspot.com/2007/07/conways-game-of-life-updated-for-rule.html Mark Natraj Gudla wrote: Mark, Are the latest examples updated to http://labs.jboss.com/jbossrules/downloads under the MR3 Examples downloadable. Thanks Natraj On 7/19/07, *Mark Proctor* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I have just updated conways game of life example to use ruleflow, the agenda group one still exists. So execute ConwayAgendaGroupRun and ConwayRuleFlowGroupRun to run the two examples. AgendaGroupDelegate and RueFlowDelegate show the two different implementations. Mark Natraj Gudla wrote: Hi, Has any one used Rule FLow with 4.0.0. I am looking for some help on how to use rule flow, where to mention the drl file name. How to use it in the java invoker classes. I have tried something, created a TestRuleFlow.rf, then added a rule group, gave it a group name as drl file name. When i use the PackageBuilder to add the rule flow, it throws the following exception _ com.thoughtworks.xstream.alias.CannotResolveClassException _: org.drools.ruleflow.core.impl.RuleFlowProcess : org.drools.ruleflow.core.impl.RuleFlowProcess at com.thoughtworks.xstream.mapper.DefaultMapper.realClass( _DefaultMapper.java:35_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.XmlFriendlyMapper.realClass( _XmlFriendlyMapper.java:44_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass( _ClassAliasingMapper.java:49_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass( _DynamicProxyMapper.java:46_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.ArrayMapper.realClass( _ArrayMapper.java:70_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.CachingMapper.realClass( _CachingMapper.java:27_) at com.thoughtworks.xstream.core.TreeUnmarshaller.start( _TreeUnmarshaller.java:95_) at com.thoughtworks.xstream.core.ReferenceByIdMarshallingStrategy.unmarshal( _ReferenceByIdMarshallingStrategy.java:12_) at com.thoughtworks.xstream.XStream.unmarshal( _XStream.java:552_) at com.thoughtworks.xstream.XStream.unmarshal( _XStream.java:540_) at com.thoughtworks.xstream.XStream.fromXML( _XStream.java:490_) at org.drools.compiler.ProcessBuilder.addProcessFromFile( _ProcessBuilder.java:76_) at org.drools.compiler.PackageBuilder.addRuleFlow( _PackageBuilder.java:199_) at com.drools.sample.ParseDRL.readRuleFromDrl( _ParseDRL.java:72_) at com.drools.sample.ParseDRL.main( _ParseDRL.java:23_)_ com.thoughtworks.xstream.alias.CannotResolveClassException _: org.drools.ruleflow.core.impl.RuleFlowProcess : org.drools.ruleflow.core.impl.RuleFlowProcess at com.thoughtworks.xstream.mapper.DefaultMapper.realClass( _DefaultMapper.java:35_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.XmlFriendlyMapper.realClass( _XmlFriendlyMapper.java:44_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass( _ClassAliasingMapper.java:49_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass( _DynamicProxyMapper.java:46_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass( _MapperWrapper.java:18_) at com.thoughtworks.xstream.mapper.ArrayMapper.realClass( _ArrayMapper.java:70_) at
Re: [rules-users] Problems Extending the Golfer example - Cartesian joins ??
we'll look into this to see where the memory is going. but won't be for another week or so - I'm currently on holiday. Mark Simon French wrote: Hi, After attending a session with Mark Proctor in London I was inspired to play around with Drools in a slightly different way than we use it for in the workplace, and try and solve a puzzle. Unfortunately I couldn't get Drools to solve it as I kept getting memory problems (I believe are cartesian joins being the problem), so I decided to extend the golfer example to see if I got the same problem I added two new names and a new integer property, club // create all possible Golfer objects String[] names = new String[] { Fred, Joe, Bob, Tom, Des, Terry }; String[] colors = new String[] { red, blue, plaid, orange,black, white }; int[] positions = new int[] { 1, 2, 3, 4, 5, 6 }; int[] clubs = new int[] {9,8,7,4,5,5}; for ( int n = 0; n names.length; n++ ) { for ( int c = 0; c colors.length; c++ ) { for ( int p = 0; p positions.length; p++ ) { for ( int q = 0; q clubs.length; q++ ) { session.insert(new Golfer( names[n], colors[c], positions[p], clubs[q]) ); Then changed the golder.drl to: package com.sample import com.sample.Golfer; rule Golfer Riddle when // A golfer named Fred, Golfer( name == Fred, $fredsPosition : position, $fredsColor : color, $fredsClub : club ) // Der Golfer hinter Fred trägt blau Golfer( $unknownsName : name != Fred, $unknownsPosition : position == ( $fredsPosition + 1 ), $unknownsColor : color == blue, color != $fredsColor, $unknownsClub : club == 5 ) // Joe steht an zweiter Stelle Golfer( name == Joe, $joesPosition : position == 2, position != $fredsPosition, $joesColor : color != $fredsColor, $joesClub : club == 5 ) // Bob traegt Karo Golfer( name == Bob, name != $unknownsName, $bobsPosition : position != $fredsPosition, position != $unknownsPosition, position != $joesPosition, $bobsColor : color == plaid, color != $fredsColor, color != $joesColor, color != $unknownsColor, $bobsClub : club $joesClub ) // Tom ist nicht 1. oder 4., traegt kein Orange Golfer( $tomsName : name == Tom, $tomsPosition : position != 1, position != 4, position != $fredsPosition, position != $joesPosition, position != $bobsPosition, $tomsColor : color != orange, color != blue, color != $fredsColor, color != $joesColor, color != $bobsColor ) Golfer ( $des : name == Des, $desPosition : position $fredsPosition, $desColor : color != blue, color != $fredsColor, color != $joesColor, color != $bobsColor ) Golfer ( $terry : name == Terry, $terryPosition : position $desPosition, $terryColor : color != blue, color != $fredsColor, color != $joesColor, color != $bobsColor ) then System.out.println( Fred + $fredsPosition + + $fredsColor ); System.out.println( Joe + $joesPosition + + $joesColor ); System.out.println( Bob + $bobsPosition + + $bobsColor ); System.out.println( Tom + $tomsPosition + + $tomsColor ); System.out.println ( Des + $desPosition + + $desColor ); System.out.println( terry + $terryPosition + + $terryColor ); end After a couple of minutes of processing I got:- Exception in thread main java.lang.OutOfMemoryError: Java heap space I also changed java memory allocation with -Xms1640M -Xmx1640M (The most I can allocate on my PC), and tried running it as a stateless session too. Is there anything else I can do, or is this simply pushing drools too far (surely not!!) ? I'm very keen on pushing this technology as much as possible in our workplace and I'd really appreciate any help. Thanks in advance Simon ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Re: [Resolved] JBossRules and JAVA Servlet / JSP
Hi, an other question , when i'm trying to execute the same code in the sample test java file provided by the wizard, I get some other errors : java.lang.NoClassDefFoundError: org/drools/WorkingMemory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet( StandardWrapper.java:1104) at org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:806) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process( Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java :447) at java.lang.Thread.run(Unknown Source) it works if i'm using a simple class, but when i try to use my servlet, it falls; and finally, is it possible to contribute withe a tutorial showing how to set up drools on eclipse and running a DroolsTest sample file,(arabic, english and frensh version) that's all i can propose for the moment. thank you. 2007/7/20, Mohammed JBossRules [EMAIL PROTECTED]: hello, Thank you all for your replays; as you've suggested, what i should import into my build path was not the core and compiler but all the set contained in the drools library, maybe that would help someone later! here is the list of jars antlr-runtime.jar drools-compiler.jar drools-core.jar drools-decisiontables.jar drools-documentation.jar drools-jsr94.jar jsr94.jar junit.jar jxl.jar mvel14.jar xercesImpl.jar xml-apis.jar xpp3.jar xstream.jar Thankyou Mark for the link with kind regards, ps: tried many times to post this mail yesterday but seems that it doesn't work, sorry if you received it more than once! Mohammed JBossRules wrote: Hello, I'm a new user for JBossRules, and I'm feeling like turning around since a while, so i thought that sole body could help... I'm using JBossRules(V4.0.0.12865MR3) on eclipse (Version: 3.3.0 Build id: I20070621-1340) on MS-Windows XP and Java(TM) SE Runtime Environment (build 1.6.0_01-b06) now the problem is how to use my rules (simple rules in a DRL file) in a dynamic project based on JSP/Servlets... i've imported the compiler, the core, jsr94, decisiontable, and also the core 3.2.3 jars to my build path , but when i try to execute the same code i'm having errors like: The import org.drools cannot be resolved but i have imported the core!! what's wrong? help please regards ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] JBossRules JSP/Servlet (Part2)
Hi, an other question , when i'm trying to execute the same code in the sample test java file provided by the wizard, I get some other errors : java.lang.NoClassDefFoundError: org/drools/WorkingMemory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0 (Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1104) at org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:806) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process (Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) it works if i'm using a simple class, but when i try to use my servlet, it falls; and finally, is it possible to contribute withe a tutorial showing how to set up drools on eclipse and running a DroolsTest sample file,(arabic, english and frensh version) that's all i can propose for the moment. thank you. - Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] JBossRules and JAVA Servlet / JSP (part2)
Please Mohamed, Attach your demo web project with scource code, then we can try to reproduce this problem. regards Fernando Meyer http://fmeyer.org [EMAIL PROTECTED] PGP: 0xD804DDFB On Jul 20, 2007, at 11:48 AM, Mohammed JBossRules wrote: 2007/7/20, Mohammed JBossRules [EMAIL PROTECTED]: Hi, an other question , when i'm trying to execute the same code in the sample test java file provided by the wizard, I get some other errors : java.lang.NoClassDefFoundError: org/drools/WorkingMemory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0 (Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet (StandardWrapper.java:1104) at org.apache.catalina.core.StandardWrapper.allocate ( StandardWrapper.java:806) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process (Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run (JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) it works fine if i'm using a simple class, but when i try to use my servlet, it falls; and finally, is it possible to contribute withe a tutorial showing how to set up drools on eclipse and running a DroolsTest sample file,(arabic, english and frensh version) that's all i can propose for the moment. thank you. 2007/7/20, Mohammed JBossRules [EMAIL PROTECTED]: hello, Thank you all for your replays; as you've suggested, what i should import into my build path was not the core and compiler but all the set contained in the drools library, maybe that would help someone later! here is the list of jars antlr-runtime.jar drools-compiler.jar drools-core.jar drools-decisiontables.jar drools-documentation.jar drools-jsr94.jar jsr94.jar junit.jar jxl.jar mvel14.jar xercesImpl.jar xml-apis.jar xpp3.jar xstream.jar Thankyou Mark for the link with kind regards, ps: tried many times to post this mail yesterday but seems that it doesn't work, sorry if you received it more than once! Mohammed JBossRules wrote: Hello, I'm a new user for JBossRules, and I'm feeling like turning around since a while, so i thought that sole body could help... I'm using JBossRules( V4.0.0.12865MR3) on eclipse (Version: 3.3.0 Build id: I20070621-1340) on MS-Windows XP and Java(TM) SE Runtime Environment (build 1.6.0_01-b06) now the problem is how to use my rules (simple rules in a DRL file) in a dynamic project based on JSP/Servlets... i've imported the compiler, the core, jsr94, decisiontable, and also the core 3.2.3 jars to my build path , but when i try to execute the same code i'm having errors like: The import org.drools cannot be resolved but i have imported the core!! what's wrong? help please regards ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] JBossRules and JAVA Servlet / JSP (part2)
2007/7/20, Mohammed JBossRules [EMAIL PROTECTED]: Hi, an other question , when i'm trying to execute the same code in the sample test java file provided by the wizard, I get some other errors : java.lang.NoClassDefFoundError: org/drools/WorkingMemory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0 (Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet( StandardWrapper.java:1104) at org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:806) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke ( StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process( Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process ( Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java :447) at java.lang.Thread.run(Unknown Source) it works fine if i'm using a simple class, but when i try to use my servlet, it falls; and finally, is it possible to contribute withe a tutorial showing how to set up drools on eclipse and running a DroolsTest sample file,(arabic, english and frensh version) that's all i can propose for the moment. thank you. 2007/7/20, Mohammed JBossRules [EMAIL PROTECTED]: hello, Thank you all for your replays; as you've suggested, what i should import into my build path was not the core and compiler but all the set contained in the drools library, maybe that would help someone later! here is the list of jars antlr-runtime.jar drools-compiler.jar drools-core.jar drools-decisiontables.jar drools-documentation.jar drools-jsr94.jar jsr94.jar junit.jar jxl.jar mvel14.jar xercesImpl.jar xml-apis.jar xpp3.jar xstream.jar Thankyou Mark for the link with kind regards, ps: tried many times to post this mail yesterday but seems that it doesn't work, sorry if you received it more than once! Mohammed JBossRules wrote: Hello, I'm a new user for JBossRules, and I'm feeling like turning around since a while, so i thought that sole body could help... I'm using JBossRules( V4.0.0.12865MR3) on eclipse (Version: 3.3.0Build id: I20070621-1340) on MS-Windows XP and Java(TM) SE Runtime Environment (build 1.6.0_01-b06) now the problem is how to use my rules (simple rules in a DRL file) in a dynamic project based on JSP/Servlets... i've imported the compiler, the core, jsr94, decisiontable, and also the core 3.2.3 jars to my build path , but when i try to execute the same code i'm having errors like: The import org.drools cannot be resolved but i have imported the core!! what's wrong? help please regards ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] BRMS Server - memory Issue while execution - Critical
Hi, I've been building a BRMS server over the Drools 4MR2 API. The Server has a Boot process to allow to make it become a Rule server(s). reads and XML configuration in which a user can specify the location of the DRL, XLS, CVS, etc. During the Boot proocess it verifies thew authenticity of each resource it loads. To sommarize: Session 1 type=Stateless Rule Source 1 Rule Source 2 .. Adapter ExternalService class=.../ Session Session 2 type=Stateful Rule Source 1 Rule Source 2 .. Session ..well its more, but I guess this paints the picture. It creates a Pool of Sessions. Now I know creating a Session is inexpensive, but the process of creating them and authentication of resources etc. (Required for prodcution quality system) Once the server is up, requests are serviced. the request knows which session it wants and facts are asserted per request. The request can be Synchronous or Async and single or batch. For testing I'm using: (JMeter test Case) Session mode: STATELESS Synchronous Mode: Batch of 5 facts (composing of other objects (about 5) which are asserted into the Session as well) at at a time Loop: 10,000 -- Does not matter how fast or slow I trow this at the engine After the request is processed and results logged; Result and what rules led to that result. I even nullify the top level Business obejcts. (a desperate attempt to free memory) After about 10,000 loops the System goes out of memory. Sorry to bore you so far, but it was important you have the right context :o) QUESTION:: Is the session maintaining references to those objects ever after executing them? Why are the objects not being released? Specially I'd imagine for a STATELESS session (which is what I've set as default). Using JMeter this system crashes every time under load, even with a single Thread. Clearly objects are not being released. The error I get may help you: (Along with out of memory). This exception only comes under Load conditions. Admin:ERROR: [com.myserver.brms.demos.certify.web.servlet.CertifyWebRequests] [service] :org.drools.spi.ConsequenceException: java.lang.NullPointerException at org.drools.common.DefaultAgenda.fireActivation (DefaultAgenda.java:501) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:461) at org.drools.common.AbstractWorkingMemory.fireAllRules (AbstractWorkingMemory.java:373) at org.drools.reteoo.ReteooStatelessSession.execute (ReteooStatelessSession.java:72) at com.myserver.brms.sessions.RulesEngineSessionJBossRules4.execute (RulesEngineSessionJBossRules4.java:113) at com.myserver.brms.services.execute.recore.batch.ExecuteSessionBatch.executeBatch (ExecuteSessionBatch.java:160) Please help me! This is the only downtime issue I face and unfortunatley its the most critical point of failure. All thats left is to build an RMI service with a console dameon shell to give it the final touches. Once this is done i'd like to share the deisng with you guys if you like it. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] BRMS Server - memory Issue while execution - Critical
We did find a memory leak for highly recursive sessions, which is fixed in trunk, please try the latekst trunk snapshot here: http://cruisecontrol.jboss.com/cc/artifacts/jboss-rules Mark Arjun Dhar wrote: Hi, I've been building a BRMS server over the Drools 4MR2 API. The Server has a Boot process to allow to make it become a Rule server(s). reads and XML configuration in which a user can specify the location of the DRL, XLS, CVS, etc. During the Boot proocess it verifies thew authenticity of each resource it loads. To sommarize: Session 1 type=Stateless Rule Source 1 Rule Source 2 .. Adapter ExternalService class=.../ Session Session 2 type=Stateful Rule Source 1 Rule Source 2 .. Session ..well its more, but I guess this paints the picture. It creates a Pool of Sessions. Now I know creating a Session is inexpensive, but the process of creating them and authentication of resources etc. (Required for prodcution quality system) Once the server is up, requests are serviced. the request knows which session it wants and facts are asserted per request. The request can be Synchronous or Async and single or batch. For testing I'm using: (JMeter test Case) Session mode: STATELESS Synchronous Mode: Batch of 5 facts (composing of other objects (about 5) which are asserted into the Session as well) at at a time Loop: 10,000 -- Does not matter how fast or slow I trow this at the engine After the request is processed and results logged; Result and what rules led to that result. I even nullify the top level Business obejcts. (a desperate attempt to free memory) After about 10,000 loops the System goes out of memory. Sorry to bore you so far, but it was important you have the right context :o) QUESTION:: Is the session maintaining references to those objects ever after executing them? Why are the objects not being released? Specially I'd imagine for a STATELESS session (which is what I've set as default). Using JMeter this system crashes every time under load, even with a single Thread. Clearly objects are not being released. The error I get may help you: (Along with out of memory). This exception only comes under Load conditions. Admin:ERROR: [com.myserver.brms.demos.certify.web.servlet.CertifyWebRequests] [service] :org.drools.spi.ConsequenceException: java.lang.NullPointerException at org.drools.common.DefaultAgenda.fireActivation (DefaultAgenda.java:501) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:461) at org.drools.common.AbstractWorkingMemory.fireAllRules (AbstractWorkingMemory.java:373) at org.drools.reteoo.ReteooStatelessSession.execute (ReteooStatelessSession.java:72) at com.myserver.brms.sessions.RulesEngineSessionJBossRules4.execute (RulesEngineSessionJBossRules4.java:113) at com.myserver.brms.services.execute.recore.batch.ExecuteSessionBatch.executeBatch (ExecuteSessionBatch.java:160) Please help me! This is the only downtime issue I face and unfortunatley its the most critical point of failure. All thats left is to build an RMI service with a console dameon shell to give it the final touches. Once this is done i'd like to share the deisng with you guys if you like it. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Re: BRMS Server - memory Issue while execution - Critical
QUESTION:: Is the session maintaining references to those objects ever after executing them? Why are the objects not being released? Specially I'd imagine for a STATELESS session (which is what I've set as default). Using JMeter this system crashes every time under load, even with a single Thread. Clearly objects are not being released. The error I get may help you: (Along with out of memory). This exception only comes under Load conditions. Admin:ERROR: [com.myserver.brms.demos.certify.web.servlet.CertifyWebRequests] [service] :org.drools.spi.ConsequenceException: java.lang.NullPointerException at org.drools.common.DefaultAgenda.fireActivation (DefaultAgenda.java:501) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:461) at org.drools.common.AbstractWorkingMemory.fireAllRules (AbstractWorkingMemory.java:373) at org.drools.reteoo.ReteooStatelessSession.execute (ReteooStatelessSession.java:72) at com.myserver.brms.sessions.RulesEngineSessionJBossRules4.execute (RulesEngineSessionJBossRules4.java:113) at com.myserver.brms.services.execute.recore.batch.ExecuteSessionBatch.executeBatch (ExecuteSessionBatch.java:160) Please help me! This is the only downtime issue I face and unfortunatley its the most critical point of failure. Ok, I think I figured it out. But please confirm. The Rule Engine Session DOES NOT release objects. (But hten why have a Stateless session?) if the duration of use of the session is not going to be long? The solution: Pool the RuleBase and on a request createa freesh session from it each time a request comes in! Let me know if the cocept is sound or what I'm thinking is now correct. Thanks, Arjun ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Fwd: [rules-users] Predicate expression effect on performance
(well, I'll keep trying) -- Forwarded message -- From: Yuri de Wit [EMAIL PROTECTED] Date: Jul 20, 2007 1:17 AM Subject: Re: [rules-users] Predicate expression effect on performance To: Rules Users List rules-users@lists.jboss.org (sorry, the OR was not part of the sample rule: I was just considering the same rule written in two different ways) I am seeing a considerable performance problem with my rules and I am trying to narrow down why. I have a small number or rules but hundreds of thousands of facts. At first the assertion goes very fast but it quickly degrades as more facts are asserted. I already reordered the predicates (I have between 8-12 predicates in most rules and reordered them more restrictive first) and saw some improvements, but not nearly enough. Then thought about to what extent predicate expressions where hitting me. Per what you say that cant be the reason. If Check is updated (as you mentioned) would that be equivalent to reasserting it into memory? I keep a status as a property of Check that get updated somewhat often. thanks, On 7/20/07, Michael Neale [EMAIL PROTECTED] wrote: In a sense, yes - but its the result of the comparison that is cached really. In the case you described, it is subrule generation. So either side of the or is like a separate rule. In version 3, the result of isSameAmount (ie if it was true or false) is cached. Things will only be re-checked if the Check fact changes (and the engine knows about the change). Note that this checking happens as you are asserting objects, not when you fireAllRules necessarily. On 7/20/07, Yuri de Wit [EMAIL PROTECTED] wrote: What is the extent of the performance impact caused by using predicate expressions? Check( amount == $amount ) or Check( $amt : amount - (isSameAmount($amt, $amount) ) My understanding is that once asserted the amount property will be cached in the shadow fact, is the result of isSameAmount(...) also cached? thanks, -- yuri ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] rete view colours appear diffirent to documentation
I was busy trying to draw a rete view according to what I was understanding from the documentation, but thought it prudent to create the rule in the ide and then look at the rete view there before assuming that I am correct. I had a bit of shock at first as it did not look at all as I expected. After a few deep breaths realized that the colors are probably just different. I need confirmation if I am reading it correctly please. Jboss Rules Documentation: Rete Nodes In the Eclipse IDE Rete view It looks like the ObjectTypeNodes are Red not blue and AlphaNodes are blue not red and the rest is the same as the documentation. Can someone please confirm this for me before I get it all wrong. Thanks Aakil image002.jpgimage003.jpg___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Re: BRMS Server - memory Issue while execution - Critical
Stateless sessions should not hold onto any references. Stateful do, and dispose() must be called when its finished - otherwise the rulebase holds a reference forever. If the rulebase is holding onto stateless sessions, then that is a bug. Mark Thanks a lot Mark, taking the latest binary passed the load testing one a single thread atleast. Though I need to confirm due to removal of modify() none of the functionality has got altered. It chokes a little in the middle but is not going out of memory so I guess the leak is really fixed. One last question on this: On the Build 4MR2, I disposed the session and created a new one from the cached RuleBase and it took the load (on the code that had the memory leak) So what approach is conceptually better; Keep the same statless session for ever or for each execution request use a new one?? I talking pure performance/memory?!?! I remember you saying creating sessions is cheap; so if I have a million requests and for each one I create a new session is it still cheap? or a single stateless session servicing the requests is better? Typical Application: telephone exchange; where numbers are bombarding the engine. For each incomming request I'd assume a single session would be the most optimal solution as long as the rules are common. Right?! I'm wondering if I should also maintain an image, object = {RuleBase + Globals} so I can create a session. but I think this would have a huge performance cost to create new sessions per request. Right? Thanks for the Fix, its life saver! Thanks, Arjun ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] JBossRules and JAVA Servlet / JSP (part2)
I have a WAR with a working WS that uses Drools 3.0.1 Would that help? If so, just let me know and I can ship it to you. Burr Mohammed JBossRules wrote: 2007/7/20, Mohammed JBossRules [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi, an other question , when i'm trying to execute the same code in the sample test java file provided by the wizard, I get some other errors : java.lang.NoClassDefFoundError: org/drools/WorkingMemory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0 (Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1104) at org.apache.catalina.core.StandardWrapper.allocate ( StandardWrapper.java:806) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process (Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) it works fine if i'm using a simple class, but when i try to use my servlet, it falls; and finally, is it possible to contribute withe a tutorial showing how to set up drools on eclipse and running a DroolsTest sample file,(arabic, english and frensh version) that's all i can propose for the moment. thank you. 2007/7/20, Mohammed JBossRules [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: hello, Thank you all for your replays; as you've suggested, what i should import into my build path was not the core and compiler but all the set contained in the drools library, maybe that would help someone later! here is the list of jars antlr-runtime.jar drools-compiler.jar drools-core.jar drools-decisiontables.jar drools-documentation.jar drools-jsr94.jar jsr94.jar junit.jar jxl.jar mvel14.jar xercesImpl.jar xml-apis.jar xpp3.jar xstream.jar Thankyou Mark for the link with kind regards, ps: tried many times to post this mail yesterday but seems that it doesn't work, sorry if you received it more than once! Mohammed JBossRules wrote: Hello, I'm a new user for JBossRules, and I'm feeling like turning around since a while, so i thought that sole body could help... I'm using JBossRules( V4.0.0.12865MR3) on eclipse (Version: 3.3.0 Build id: I20070621-1340) on MS-Windows XP and Java(TM) SE Runtime Environment (build 1.6.0_01-b06) now the problem is how to use my rules (simple rules in a DRL file) in a dynamic project based on JSP/Servlets... i've imported the compiler, the core, jsr94, decisiontable, and also the core 3.2.3 jars to my build path , but when i try to execute the same code i'm having errors like: The import org.drools cannot be resolved but i have imported the core!! what's wrong? help please regards ___ rules-users mailing list rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] The method modify(MyBusinessObject) is undefined for the type Rule_xxx
Hi, I took the latest Snapshots from the trunk, to check if the memory leak problem was fixed, but in compiling the rules i got: The method modify(MyBusinessObject) is undefined for the type Rule_xxx Have you removed modify()? so By default modify will be invoked without having to explicitly call it? Thanks, Arjun ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rete view colours appear diffirent to documentation
The rete diagrams in the manual are not documenting the behaviour of the IDE, although yes we should probably align those. Open up the poperties view in eclipse, then click on a node, it will tell you what it is and provide other information. Mark Aakil Omar wrote: I was busy trying to draw a rete view according to what I was understanding from the documentation, but thought it prudent to create the rule in the ide and then look at the rete view there before assuming that I am correct. I had a bit of shock at first as it did not look at all as I expected. After a few deep breaths realized that the colors are probably just different. I need confirmation if I am reading it correctly please. Jboss Rules Documentation: In the Eclipse IDE Rete view It looks like the ObjectTypeNodes are Red not blue and AlphaNodes are blue not red and the rest is the same as the documentation. Can someone please confirm this for me before I get it all wrong. Thanks Aakil ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Re: BRMS Server - memory Issue while execution - Critical
Hi Arjun - I wouldn't recommend re-using session unless there is some expensive state you wish to reuse. Pooling them will use up far more resources then freeing them. You should only pool expensive to obtain resources. On 7/21/07, Arjun Dhar [EMAIL PROTECTED] wrote: Stateless sessions should not hold onto any references. Stateful do, and dispose() must be called when its finished - otherwise the rulebase holds a reference forever. If the rulebase is holding onto stateless sessions, then that is a bug. Mark Thanks a lot Mark, taking the latest binary passed the load testing one a single thread atleast. Though I need to confirm due to removal of modify() none of the functionality has got altered. It chokes a little in the middle but is not going out of memory so I guess the leak is really fixed. One last question on this: On the Build 4MR2, I disposed the session and created a new one from the cached RuleBase and it took the load (on the code that had the memory leak) So what approach is conceptually better; Keep the same statless session for ever or for each execution request use a new one?? I talking pure performance/memory?!?! I remember you saying creating sessions is cheap; so if I have a million requests and for each one I create a new session is it still cheap? or a single stateless session servicing the requests is better? Typical Application: telephone exchange; where numbers are bombarding the engine. For each incomming request I'd assume a single session would be the most optimal solution as long as the rules are common. Right?! I'm wondering if I should also maintain an image, object = {RuleBase + Globals} so I can create a session. but I think this would have a huge performance cost to create new sessions per request. Right? Thanks for the Fix, its life saver! Thanks, Arjun ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users