Re: [rules-users] Integrating DROOLS in J2EE...

2007-10-26 Thread Dean Jones
On 10/25/07, Paul Smith <[EMAIL PROTECTED]> wrote: > I don't know of any tutorials but I've been running Drools and JBoss > together with a MySQL database and EJB3 for about 18 months now. Currently > on Drools 4.02 with JBoss 4.2.1GA. It all works pretty well except for for > the need to use the J

Re: [rules-users] Pattern matching question

2007-10-02 Thread Dean Jones
Hello Markus, > > Hi, I have two questions for pattern matching with drools: > > 1. I have a multiline string to which a would match an expression. I've > tried that in various ways, but none worked. Is this not supported? > You can prefix the regex to be matched with "(?m)", which enables multili

Re: [rules-users] Pattern matching question

2007-10-02 Thread Dean Jones
> > > You can prefix the regex to be matched with "(?m)", which enables > multiline mode. The full set of available flags are documented under > "Special Constructs" on the javadoc for pattern: > Whoops, that should be (?s) for the DOTALL flag, which specifies that "." should match any character,

Re: [rules-users] Date for 2 years ago

2007-09-18 Thread Dean Jones
Hello Brian, I've done something similar previously using a combination of a field binding constraint, an eval and the excellent joda-time API (http://joda-time.sourceforge.net/). If I remember right, you'd need something along the lines of : import org.joda.time.Duration; import org.joda.time.Da

Re: [rules-users] Simple rulebase not behaving as expected : Part 2

2007-08-23 Thread Dean Jones
Hi Edson, On 8/23/07, Edson Tirelli <[EMAIL PROTECTED]> wrote: > >Looks like a bug. Can you please open a JIRA for this? > Done. http://jira.jboss.com/jira/browse/JBRULES-1116 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jb

Re: [rules-users] Rule compilation errors under heavy load

2007-08-23 Thread Dean Jones
I've filed a JIRA for this issue http://jira.jboss.com/jira/browse/JBRULES-1114 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Simple rulebase not behaving as expected : Part 2

2007-08-23 Thread Dean Jones
Hello again, I'm probably missing something fundamental here, but I have the following rulebase: package org.drools.examples rule "Hello World" when Integer() then System.out.println("Hello world"); end rule "Goodbye World" when not In

Re: [rules-users] Simple rulebase not behaving as expected

2007-08-22 Thread Dean Jones
s of > Object, and that is why the rule fires. >If instead of Object, you use a different class, like Integer for > instance, to constrain your rule, you will get the behavior you are looking > for. > > []s >Edson > > 2007/8/22, Dean Jones < [EMAIL PROTECT

[rules-users] Simple rulebase not behaving as expected

2007-08-22 Thread Dean Jones
Hi, I have the following simple rulebase: package org.drools.examples rule "Hello World" when o : Object( ) then System.out.println("Hello world (o=" + o + ")"); end rule "Goodbye World" when not Object( ) then System

Re: [rules-users] Problem with function

2007-07-25 Thread Dean Jones
Isn't the problem that the function parameter (loanAmount) doesn't have a type? Or am I missing something? Dean. On 7/25/07, Edson Tirelli <[EMAIL PROTECTED]> wrote: Natraj, Can you try it with the 4.0GA release please? We fixed a couple issues related to functions for the final relea

Re: [rules-users] Rule compilation errors under heavy load

2007-07-16 Thread Dean Jones
Hi Thomas, On 7/16/07, Hehl, Thomas <[EMAIL PROTECTED]> wrote: Couldn't you use yield() to generate a context-switch? It would only happen in that spot, but should produce some good testing. It's a good point about using yield(). I did use this originally, but for some reason it generated few

Re: [rules-users] custom rule creation/parsing

2007-07-16 Thread Dean Jones
Hello Eugeny, Not sure if this is the recommended way, but I did something similar using the classes in the org.drools.lang.descr package. You can create a PackageDescr from your custom objects and then call PackageBuilder.addPackage(PackageDescr) and PackageBuilder.getPackage() to get an org.dro

Re: [rules-users] Rule compilation errors under heavy load

2007-07-16 Thread Dean Jones
On 7/14/07, Mark Proctor <[EMAIL PROTECTED]> wrote: We are going to need an integration test, to reproduce this, can you supply one? Okay, I've just converted the simple test that I added earlier to a Junit test. The test is not guaranteed to fail if there are thread safety errors, just very li

Re: [rules-users] Rule compilation errors under heavy load

2007-07-13 Thread Dean Jones
Hi Mark, On 7/13/07, Mark Proctor <[EMAIL PROTECTED]> wrote: I think I've alread fixed this in trunk - when dealing with add/removing stuff I now do a block syncronisation on the pkgs instance. If that test is clean, we should add it to the list of integration tests, to track regressions. I

Re: [rules-users] Rule compilation errors under heavy load

2007-07-12 Thread Dean Jones
Hi Edson, On 7/12/07, Edson Tirelli <[EMAIL PROTECTED]> wrote: Is it possible for you to provide a test case capable of reproducing the problem? I've written a quick test case, which is attached. When numberOfThreads==1, everything compiles okay. When numberOfThreads==100, I get function c

[rules-users] Re: Rule compilation errors under heavy load

2007-07-12 Thread Dean Jones
Dean Jones gmail.com> writes: > > Sorry, I forgot to say that the problem originally happened when using Drools v4.0MR2 and also occurs when using v4.0MR3, Dean. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.

[rules-users] Rule compilation errors under heavy load

2007-07-12 Thread Dean Jones
Hello folks, I'm experiencing some odd behaviour from Drools (or maybe the Eclipse compiler) when load-testing my application, and wondered if anyone else had experienced the same issue. I have a web service which, for every request, loads in rules from the database, creates a org.drools.lang.des