[jboss-svn-commits] JBL Code SVN: r33325 - labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jun 3 04:53:20 EDT 2010


Author: mark.proctor at jboss.com
Date: 2010-06-03 04:53:19 -0400 (Thu, 03 Jun 2010)
New Revision: 33325

Modified:
   labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/NamedEntryPoint.java
Log:
-named entry points should also readlock the kbase

Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/NamedEntryPoint.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/NamedEntryPoint.java	2010-06-03 02:26:50 UTC (rev 33324)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/NamedEntryPoint.java	2010-06-03 08:53:19 UTC (rev 33325)
@@ -117,6 +117,7 @@
                 addPropertyChangeListener( object );
             }
             try {
+                this.ruleBase.readLock();
                 this.lock.lock();
                 insert( handle,
                         object,
@@ -124,6 +125,7 @@
                         activation );
 
             } finally {
+                this.ruleBase.unlock();
                 this.lock.unlock();
             }
             return handle;
@@ -178,6 +180,7 @@
                           final Rule rule,
                           final Activation activation) throws FactException {
         try {
+            this.ruleBase.readLock();
             this.lock.lock();
             this.ruleBase.executeQueuedActions();
             this.wm.startOperation();
@@ -239,6 +242,7 @@
             this.wm.executeQueuedActions();
         } finally {
             this.wm.endOperation();
+            this.ruleBase.unlock();
             this.lock.unlock();
         }
     }
@@ -257,6 +261,7 @@
                         final Rule rule,
                         final Activation activation) throws FactException {
         try {
+            this.ruleBase.readLock();
             this.lock.lock();
             this.ruleBase.executeQueuedActions();
             this.wm.startOperation();
@@ -303,6 +308,7 @@
             this.wm.executeQueuedActions();
         } finally {
             this.wm.endOperation();
+            this.ruleBase.unlock();
             this.lock.unlock();
         }
     }
@@ -317,6 +323,7 @@
                               final Rule rule,
                               final Activation activation) {
         try {
+            this.ruleBase.readLock();
             this.lock.lock();
             this.ruleBase.executeQueuedActions();
             this.wm.startOperation();
@@ -356,6 +363,7 @@
 
         } finally {
             this.wm.endOperation();
+            this.ruleBase.unlock();
             this.lock.unlock();
         }
     }
@@ -385,6 +393,7 @@
                                 final Rule rule,
                                 final Activation activation) {
         try {
+            this.ruleBase.readLock();
             this.lock.lock();
             this.ruleBase.executeQueuedActions();
             this.wm.startOperation();
@@ -431,6 +440,7 @@
             this.wm.executeQueuedActions();
         } finally {
             this.wm.endOperation();
+            this.ruleBase.unlock();
             this.lock.unlock();
         }
     }



More information about the jboss-svn-commits mailing list