[rules-users] Drools documentation on 'from' with Hibernate queries

2008-01-22 Thread Gattiker, Alexandre
A section of the Drools documentation ends abruptly with the sentence: The 
next example shows how we can reason over the results of a hibernate query. The 
Restaurant pattern will reason over and bind with each result in turn:

The rest could be found here:
http://blog.athico.com/2007/06/chained-from-accumulate-collect.html

Cheers
Alexandre

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


[rules-users] Drools low concurrency/high synchronization? !NOSIG!

2008-01-22 Thread Ingomar Otter

Folks,
I am currently trying to scale our implementation by farming out
request into mutliple threads. I am on a 4 CPU Mac.
A few things I am wondering about:
1. Although I see an increase in CPU load when going from single to
multi-threaded processing the throughput increased marginally. I am
pretty sure that my measurements are correct. I have checked the GC
and this is not the source of congestion. My question here is whether
Drools is using lot's of synchronization that may explain this.
2. When I share the RuleBase accross threads (which I think is valid?)
I get interesting errors during execution. eg:

org.drools.RuntimeDroolsException: Exception executing predicate
[EMAIL PROTECTED]
at
org
.drools
.rule
.PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:246)
at
org
.drools
.common
.TripleBetaConstraints.isAllowedCachedRight(TripleBetaConstraints.java:
200)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:150)
at
org
.drools
.reteoo
.CompositeObjectSinkAdapter
.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:
153)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:
192)
at
org
.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at
org
.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:
909)
at
org
.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:
881)
at
org
.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:
682)
at .DroolsPD.validate(DroolsPD.java:66)
at .DroolsMTRunner.run(DroolsMTRunner.java:30)
at java.lang.Thread.run(Thread.java:552)
Caused by: org.mvel.CompileException: cannot invoke getter: getSAClass
[declr.class: xxx.AbstractSA; act.class: null]
at
org
.mvel.optimizers.impl.refl.GetterAccessor.getValue(GetterAccessor.java:
52)
at
org
.mvel
.optimizers.impl.refl.VariableAccessor.getValue(VariableAccessor.java:
39)
at
org
.mvel
.ast
.VariableDeepPropertyNode
.getReducedValueAccelerated(VariableDeepPropertyNode.java:22)
at
org
.mvel
.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:21)
at
org
.mvel
.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21)
at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
at org.mvel.MVEL.executeExpression(MVEL.java:235)
at
org
.drools
.base
.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:36)
at
org
.drools
.rule
.PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:240)
... 13 more
Caused by: java.lang.NullPointerException
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org
.mvel.optimizers.impl.refl.GetterAccessor.getValue(GetterAccessor.java:
42)
... 22 more

Details:
 * I use StatelessSessions which are private to the threads
 * No data is shared between threads (with the exception of the
RuleBase, as outline above)
 * I am on JDK 1.5

I would be grateful for any pointers for 'correct' use of Drools in an
MT environment.
Cheers,
  Ingomar

--
Ingomar Otter
Chief Technology Officer
mailto:[EMAIL PROTECTED]
Mobile: +49 172 2367867

Valtech GmbH
Bahnstraße 16
40212 Düsseldorf
Germany

Phone: +49 (0)211 179237-0
Fax: +49 211 179237-19

http://www.valtech.de

Geschäftsführer: Ingo Kriescher
Amtsgericht Düsseldorf HRB48672
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools low concurrency/high synchronization? !NOSIG!

2008-01-22 Thread Fernando Meyer
Hi Ingomar,

Which drools version are you using? We made improvements on 4.0.4, that
fixes concurrency issues on mvel core, so if you aren't using it please do
an update and try test against your environment.

Please let me know if your problems go away when you upgrade.

Thanks

On Jan 22, 2008 11:13 AM, Ingomar Otter [EMAIL PROTECTED] wrote:

  Folks,I am currently trying to scale our implementation by farming out
 request into mutliple threads. I am on a 4 CPU Mac.
 A few things I am wondering about:
 1. Although I see an increase in CPU load when going from single to
 multi-threaded processing the throughput increased marginally. I am pretty
 sure that my measurements are correct. I have checked the GC and this is not
 the source of congestion. My question here is whether Drools is using lot's
 of synchronization that may explain this.
 2. When I share the RuleBase accross threads (which I think is valid?) I
 get interesting errors during execution. eg:

 org.drools.RuntimeDroolsException: Exception executing predicate
 [EMAIL PROTECTED]
 atorg.drools.rule.PredicateConstraint.isAllowedCachedRight(
 PredicateConstraint.java:246)
 at org.drools.common.TripleBetaConstraints.isAllowedCachedRight(
 TripleBetaConstraints.java:200)
 atorg.drools.reteoo.JoinNode.assertObject(JoinNode.java:150)
 atorg.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(
 CompositeObjectSinkAdapter.java:318)
 atorg.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
 at org.drools.reteoo.Rete.assertObject(Rete.java:175)
 atorg.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
 at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java
 :71)
 at org.drools.common.AbstractWorkingMemory.insert(
 AbstractWorkingMemory.java:909)
 atorg.drools.common.AbstractWorkingMemory.insert(
 AbstractWorkingMemory.java:881)
 atorg.drools.common.AbstractWorkingMemory.insert(
 AbstractWorkingMemory.java:682)
 at.DroolsPD.validate(DroolsPD.java:66)
 at .DroolsMTRunner.run(DroolsMTRunner.java:30)
 at java.lang.Thread.run(Thread.java:552)
 Caused by: org.mvel.CompileException: cannot invoke getter: getSAClass [
 declr.class: xxx.AbstractSA; act.class: null]
 atorg.mvel.optimizers.impl.refl.GetterAccessor.getValue(
 GetterAccessor.java:52)
 at org.mvel.optimizers.impl.refl.VariableAccessor.getValue(
 VariableAccessor.java:39)
 at org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(
 VariableDeepPropertyNode.java:22)
 atorg.mvel.ast.PropertyASTNode.getReducedValueAccelerated(
 PropertyASTNode.java:21)
 at org.mvel.ast.BinaryOperation.getReducedValueAccelerated(
 BinaryOperation.java:21)
 at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
 at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
 atorg.mvel.MVEL.executeExpression(MVEL.java:235)
 at org.drools.base.mvel.MVELPredicateExpression.evaluate(
 MVELPredicateExpression.java:36)
 atorg.drools.rule.PredicateConstraint.isAllowedCachedRight(
 PredicateConstraint.java:240)
 ... 13 more
 Caused by: java.lang.NullPointerException
 atsun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
 atsun.reflect.DelegatingMethodAccessorImpl.invoke(
 DelegatingMethodAccessorImpl.java:25)
 atjava.lang.reflect.Method.invoke(Method.java:324)
 at org.mvel.optimizers.impl.refl.GetterAccessor.getValue(
 GetterAccessor.java:42)
 ... 22 more

 Details:
  * I use StatelessSessions which are private to the threads
  * No data is shared between threads (with the exception of the RuleBase,
 as outline above)
  * I am on JDK 1.5

 I would be grateful for any pointers for 'correct' use of Drools in an MT
 environment.
 Cheers,
   Ingomar


 Ingomar Otter
 Chief Technology Officer
 [EMAIL PROTECTED]
 Mobile: +49 172 2367867

 Valtech GmbH
 Bahnstraße 16
 40212 Düsseldorf
 Germany

 Phone: +49 (0)211 179237-0
 Fax: +49 211 179237-19

 www.valtech.de

 Geschäftsführer: Ingo Kriescher
 Amtsgericht Düsseldorf HRB48672


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




-- 
Fernando Meyer http://fmeyer.org
JBoss Rules Core Developer
[EMAIL PROTECTED]
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] BRMS locks jackrabbit

2008-01-22 Thread safi

Hi,

we are trying to use Drools as a business rules engine and we have
encountered some difficulties. First of all when we log into BRMS, the
jackrabbit session is created and JCR is locked. This seems to be natural
and of course it is correct but we need to communicate with repository from
other applications which is not possible due to locking. Do you have any
idea how to simply solve it?
We have tried to sign out from the BRMS but is does not seem to work (to
unlock the JCR). The solution could be to use jackrabbit in model 2 or 3,
but we could not find any instructions how to configure BRMS to use these
models. There is a configuration file components.xml in the BRMS WEB-INF
folder which is used for configuring the repository, so is there any
property or anything which could be used for configuring BRMS to use a JNDI
to access the repository?
From our point of view it seems that we will have to implement
JCRRepositoryConfigurator and set property
name=configuratoroutRepositoryConfigurator/property into the
components.xml. Is it right?

We are using Drools 4.0.3 and we deploy BRMS to Glassfigh V2 b58g.

Thank you for your answers.

Safi



-- 
View this message in context: 
http://www.nabble.com/BRMS-locks-jackrabbit-tp15018752p15018752.html
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] Drools low concurrency/high synchronization? !NOSIG!

2008-01-22 Thread Mark Proctor
This looks different to what was fixed in 4.0.4. I'm cc'ing brockm to 
get his feedback as it looks like an MVEL bug on accessors.


Mark
Fernando Meyer wrote:

Hi Ingomar,

Which drools version are you using? We made improvements on 4.0.4, 
that fixes concurrency issues on mvel core, so if you aren't using it 
please do an update and try test against your environment.


Please let me know if your problems go away when you upgrade.

Thanks 

On Jan 22, 2008 11:13 AM, Ingomar Otter [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Folks,
I am currently trying to scale our implementation by farming out
request into mutliple threads. I am on a 4 CPU Mac.
A few things I am wondering about:
1. Although I see an increase in CPU load when going from single
to multi-threaded processing the throughput increased marginally.
I am pretty sure that my measurements are correct. I have checked
the GC and this is not the source of congestion. My question here
is whether Drools is using lot's of synchronization that may
explain this. 
2. When I share the RuleBase accross threads (which I think is

valid?) I get interesting errors during execution. eg:

org.drools.RuntimeDroolsException : Exception executing predicate
[EMAIL PROTECTED]
atorg.drools.rule.PredicateConstraint.isAllowedCachedRight(
PredicateConstraint.java:246)
at

org.drools.common.TripleBetaConstraints.isAllowedCachedRight(TripleBetaConstraints.java:200)

atorg.drools.reteoo.JoinNode.assertObject(JoinNode.java:150)


atorg.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
atorg.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
atorg.drools.reteoo.ReteooRuleBase.assertObject
(ReteooRuleBase.java:192)
at
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)

at

org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:909)


atorg.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:881)


atorg.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:682)

at.DroolsPD.validate(DroolsPD.java:66)
at .DroolsMTRunner.run(DroolsMTRunner.java:30)
at java.lang.Thread.run(Thread.java:552)
Caused by: org.mvel.CompileException: cannot invoke getter:
getSAClass [declr.class: xxx.AbstractSA; act.class: null]
atorg.mvel.optimizers.impl.refl.GetterAccessor.getValue(
GetterAccessor.java:52)
at

org.mvel.optimizers.impl.refl.VariableAccessor.getValue(VariableAccessor.java:39)

at

org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode.java:22)

atorg.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:21)
at

org.mvel.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21)

at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)

atorg.mvel.MVEL.executeExpression(MVEL.java:235)
at

org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:36)


atorg.drools.rule.PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:240)
... 13 more
Caused by: java.lang.NullPointerException
atsun.reflect.GeneratedMethodAccessor6.invoke (Unknown Source)
atsun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
atjava.lang.reflect.Method.invoke( Method.java:324)
at

org.mvel.optimizers.impl.refl.GetterAccessor.getValue(GetterAccessor.java:42)

... 22 more

Details:
 * I use StatelessSessions which are private to the threads
 * No data is shared between threads (with the exception of the
RuleBase, as outline above)
 * I am on JDK 1.5

I would be grateful for any pointers for 'correct' use of Drools
in an MT environment.
Cheers,
  Ingomar


Ingomar Otter
Chief Technology Officer
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Mobile: +49 172 2367867

Valtech GmbH
Bahnstraße 16
40212 Düsseldorf
Germany

Phone: +49 (0)211 179237-0
Fax: +49 211 179237-19

www.valtech.de http://www.valtech.de/

Geschäftsführer: Ingo Kriescher
Amtsgericht Düsseldorf HRB48672
 


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




--
Fernando Meyer http://fmeyer.org
JBoss Rules Core Developer
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]


___
rules-users mailing list
rules-users@lists.jboss.org

Re: [rules-users] OutOfMemory with BRMS 4.0.3

2008-01-22 Thread sophie . ramel
Hello michael, 

 Is the rule agent running on a separate server to the brms? 
The initial configuration was: 
- BRMS in tomcat 5.5
- server with RuleAgent in Jboss AS 3.2.8

But now I moved to this configuration:
- server with RuleAgent in Jboss AS 3.2.8 (unchanged)
- BRMS is also in the same jboss instance

And in both cases I have the problem. 

 Is the rule agent actually running when the error happens?
No I don't think so. 
I don't have any exception before I try to go to a web page (either of the 
BRMS, or of my other server in Jboss when the BRMS is in the same jboss 
instance), and then I get OufOfMemoryError: Java heap space. The RuleAgent 
is only instantiated when I send a specific request to my server (and I'm 
not even sure it was called once before the last crash). 

 Also that is an old version  of jboss as?
yes, it's Jboss application server 3.2.8 (I think it is the last and only 
one in the 3.x series that works with JDK 1.5): I need to use an older 
version because of other compatibility issues of my server, but since I 
had exactly the same problem with Tomcat, I'm beginning to think it may 
not be linked to the server version ...?

Regards,

Sophie




Michael Neale [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
22/01/2008 11:31
Please respond to
Rules Users List rules-users@lists.jboss.org


To
Rules Users List rules-users@lists.jboss.org
cc
Rules Users List rules-users@lists.jboss.org
Subject
Re: [rules-users] OutOfMemory with BRMS 4.0.3






Thanks sophie. A few more questions to narrow this down. Is the rule 
agent running on a separate server to the brms? Is the rule agent 
actually running when the error happens? Also that is an old version 
of jboss as?

I guess the rest depends on your answers to the above.

Let me know.

Michael



Sent from my iPhone

On 21/01/2008, at 23:03, [EMAIL PROTECTED] wrote:

 Hello again,

 After coming back after almost a week without touching the server, the
 jboss application server with the BRMS also makes a OutOfMemory 
 exception
 when I try to use the BRMS.

 When you get back to work if you could provide more info it would be
 great.
 What kind of info do you need?
 Here is what is done in my server code, to fire the rules:

 Properties props=new Properties();
 props.setProperty(newInstance, false);
 props.setProperty(url, packageURL);
 props.setProperty(localCacheDir, cacheDir);
 props.setProperty(poll, 30);
 props.setProperty(name, Agent-+pid);
 RuleAgent agent = RuleAgent.newRuleAgent(props);
 RuleBase rb = agent.getRuleBase();
 workingMemory=ruleBase.newStatefulSession();

 and then we insert all objects in the working memory with wm.insert 
 (o);,
 but recursively in order for all the objects to be directly 
 accessible in
 rules (We've got a hierarchic structure, an XML file transformed in 
 Java
 by JAXB, so the insert method tests the accessor methods of the 
 object and
 is called recursively on the accessors' results, before inserting the
 object).

 then we call:
 workingMemory.fireAllRules();
 [...interprate results...]
 workingMemory.dispose();


 Best regards,

 Sophie



 Michael Neale [EMAIL PROTECTED]
 Sent by: [EMAIL PROTECTED]
 17/01/2008 23:34
 Please respond to
 Rules Users List rules-users@lists.jboss.org


 To
 Rules Users List rules-users@lists.jboss.org
 cc
 Rules Users List rules-users@lists.jboss.org
 Subject
 Re: [rules-users] OutOfMemory with BRMS 4.0.3






 Thanks sophie. Any oome I will investigate it just takes time to find
 them. I have been running some overnight tests myself today. When you
 get back to work if you could provide more info it would be great.

 If the agent is running then it polls the brms. So that could be one
 of the possible causes.

 Sent from my iPhone

 On 17/01/2008, at 22:44, [EMAIL PROTECTED] wrote:

 Hi Michael,

 I'm not at my company these days so I cannot check or make further
 tests.
 But yes, we use a rule agent and an URL to query the rule.
 And it happens after 1-2 days whether we use the system or not, it
 doesn't
 seem to make any difference.

 however, I'll check when returning, but I think it still worked
 after a few
 days, now that I have moved the BRMS to the Jboss 3.2.3 app server.

 thanks for trying to help me!

 Sophie

 [EMAIL PROTECTED] wrote: -

 To: Rules Users List rules-users@lists.jboss.org
 From: Michael Neale [EMAIL PROTECTED]
 Sent by: [EMAIL PROTECTED]
 Date: 01/17/2008 12:52AM
 Subject: Re: [rules-users] OutOfMemory with BRMS 4.0.3

 Hi Sophie - how is the jboss runtime server querying this? via the
 rule
 agent (and a URL)?

 just trying to work out what the usage pattern is so we can
 reproduce it.

 Michael.


 On Jan 11, 2008 12:20 AM,  
 [EMAIL PROTECTED]
 wrote:

 Hello,

 I am using Drools BRMS 4.0.3 with tomcat 5.5.25, and I get 
 OutOfMemory
 exceptions in tomcat regularly.

 I recently changed the java option of tomcat to add -Xmx512m, but 
 it
 only resulted in taking a little more time before crashing (3 days,
 instead of 1 before).
 

Re: [rules-users] BRMS locks jackrabbit

2008-01-22 Thread Mark Proctor

safi wrote:

Hi,

we are trying to use Drools as a business rules engine and we have
encountered some difficulties. First of all when we log into BRMS, the
jackrabbit session is created and JCR is locked. This seems to be natural
and of course it is correct but we need to communicate with repository from
other applications which is not possible due to locking. Do you have any
idea how to simply solve it?
  
One option is to remote against the SEAM RCP api for the BRMS, rather 
than Jackrabbit directly. Mic will be online later and might be able to 
shed more light on this.

We have tried to sign out from the BRMS but is does not seem to work (to
unlock the JCR). The solution could be to use jackrabbit in model 2 or 3,
but we could not find any instructions how to configure BRMS to use these
models. There is a configuration file components.xml in the BRMS WEB-INF
folder which is used for configuring the repository, so is there any
property or anything which could be used for configuring BRMS to use a JNDI
to access the repository?
From our point of view it seems that we will have to implement
JCRRepositoryConfigurator and set property
name=configuratoroutRepositoryConfigurator/property into the
components.xml. Is it right?

We are using Drools 4.0.3 and we deploy BRMS to Glassfigh V2 b58g.

Thank you for your answers.

Safi



  


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


[rules-users] How to fire just one rule in a .drl.

2008-01-22 Thread Christie, Blair
I am trying to  set up a set of unit tests for the set of rules in a
.drl file.

How can you fire just one rule in a .drl packaqe. 

 

Cheers,
Blair

 

 

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


Re: [rules-users] How to fire just one rule in a .drl.

2008-01-22 Thread Edson Tirelli
For unit tests, you can use agenda filters.

   []s
   Edson

2008/1/22, Christie, Blair [EMAIL PROTECTED]:

  I am trying to  set up a set of unit tests for the set of rules in a .drl
 file.

 How can you fire just one rule in a .drl packaqe.



 Cheers,
 Blair





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




-- 
  Edson Tirelli
  JBoss Drools Core Development
  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] Drools and Spring Integration

2008-01-22 Thread Mark Proctor
I've had no feedback on the dev mailing list about this, so thought I'd 
mention it here. If you want strong spring/guice integration with Drools 
please do get involved in this project and if they mature well enough 
we'll include them as part of the standard distro.

http://blog.athico.com/2008/01/drools-and-spring-integration.html

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


Re: [rules-users] can i reuse rulebase

2008-01-22 Thread Mark Proctor

jack wu wrote:

my profiler shows that it takes the same amount of time to do:

final RuleBase ruleBase = RuleBaseFactory.newRuleBase( 
RuleBase.RETEOO, conf );


as to do:
session.executeWithResults();

i am wondering if i can cache the ruleBase and do addPackage() and 
removePackage() for each executeWithResults().


the ducmentation says always create a new ruleBase. so i am kind of 
confused. thanks for the help.
Yes you can do this, but it's not thread safe (unlike stateful 
sessions). The stateless session could be propagating data mid change 
and thus leaving the network invalid. So if you do this, which is not 
recommended practice, do make sure that you know that there are 
currently no valid executing sessions for that RuleBase.


thanks.


Looking for last minute shopping deals? Find them fast with Yahoo! 
Search. 
http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping 




___
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] package deserialize improvements

2008-01-22 Thread Mark Proctor

jack wu wrote:
i remember seeing some one mentioning org.drools.rule.Package 
serialization is slow and there are some improvement code coming in. 
is that code already in the code base? thanks.
No that is not there. Simon Harris, an old school drools hacker, has 
looked into it and believes he can get 10x speed improvements. However 
his free time, due to a baby on the way, will not accomodate this work - 
so he is waiting for someone to sponsor this work.


Mark


jack.


Never miss a thing. Make Yahoo your homepage. 
http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs



___
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