svn commit: r1131164 - in /ofbiz/branches/release11.04: ./ applications/order/script/org/ofbiz/order/customer/ applications/party/webapp/partymgr/WEB-INF/actions/party/ applications/product/script/org/ofbiz/product/test/ framework/common/widget/ framew...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1131164 - in /ofbiz/branches/release11.04: ./ applications/order/script/org/ofbiz/order/customer/ applications/party/webapp/partymgr/WEB-INF/actions/party/ applications/product/script/org/ofbiz/product/test/ framework/common/widget/ framew...

jleroux@apache.org
Author: jleroux
Date: Fri Jun  3 19:45:25 2011
New Revision: 1131164

URL: http://svn.apache.org/viewvc?rev=1131164&view=rev
Log:
"Applied fix from trunk for revision: 1131144"
------------------------------------------------------------------------
r1131144 | jleroux | 2011-06-03 21:05:07 +0200 (ven., 03 juin 2011) | 3 lines

Closes "JmsTopicListener started twice when distributed-cache-clear is active" reported by Martin Kreidenweis at https://issues.apache.org/jira/browse/OFBIZ-4296

Simply avoid to start a JMS Listener thread from Job Manager when DCC is on. Then set it back to previous value.
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release11.04/   (props changed)
    ofbiz/branches/release11.04/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml   (props changed)
    ofbiz/branches/release11.04/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy   (props changed)
    ofbiz/branches/release11.04/applications/product/script/org/ofbiz/product/test/InventoryTests.xml   (props changed)
    ofbiz/branches/release11.04/framework/common/widget/HelpScreens.xml   (props changed)
    ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/Delegator.java
    ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
    ofbiz/branches/release11.04/framework/security/data/PasswordSecurityData.xml   (props changed)
    ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/ServiceDispatcher.java
    ofbiz/branches/release11.04/specialpurpose/ebaystore/lib/   (props changed)
    ofbiz/branches/release11.04/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy   (props changed)
    ofbiz/branches/release11.04/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy   (props changed)
    ofbiz/branches/release11.04/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy   (props changed)

Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4:951708-952957
 /ofbiz/branches/jquery:952958-1044489
 /ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:1100197,1100880,1104423
+/ofbiz/trunk:1100197,1100880,1104423,1131144

Propchange: ofbiz/branches/release11.04/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-952957
 /ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:952958-1044489
 /ofbiz/branches/multitenant20100310/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:921280-927264
-/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:1100197,1100880,1104423
+/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:1100197,1100880,1104423,1131144

Propchange: ofbiz/branches/release11.04/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:951708-952957
 /ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:952958-1044489
 /ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:921280-927264
-/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:1100197,1100880,1104423
+/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:1100197,1100880,1104423,1131144

Propchange: ofbiz/branches/release11.04/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-952957
 /ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:952958-1044489
 /ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:921280-927264
-/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:1100197,1100880,1104423
+/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:1100197,1100880,1104423,1131144

Propchange: ofbiz/branches/release11.04/framework/common/widget/HelpScreens.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/framework/common/widget/HelpScreens.xml:951708-952957
 /ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml:952958-1044489
 /ofbiz/branches/multitenant20100310/framework/common/widget/HelpScreens.xml:921280-927264
-/ofbiz/trunk/framework/common/widget/HelpScreens.xml:1100197,1100880,1104423
+/ofbiz/trunk/framework/common/widget/HelpScreens.xml:1100197,1100880,1104423,1131144

Modified: ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/Delegator.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/Delegator.java?rev=1131164&r1=1131163&r2=1131164&view=diff
==============================================================================
--- ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/Delegator.java (original)
+++ ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/Delegator.java Fri Jun  3 19:45:25 2011
@@ -1209,4 +1209,17 @@ public interface Delegator {
      */
     public int storeByCondition(String entityName, Map<String, ? extends Object> fieldsToSet, EntityCondition condition, boolean doCacheClear) throws GenericEntityException;
 
+    /**
+     * Enables/Disables the JMS listeners globally
+     * (this will not effect any dispatchers already running)
+     * @param enable
+     */
+    public void enableJMS(boolean enable);
+
+    /**
+     * Get Enabled/Disabled JMS listeners status
+     * @return boolean true is JMS listeners are enabled
+     */
+    public boolean getEnabledJMS();
+    
 }

Modified: ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1131164&r1=1131163&r2=1131164&view=diff
==============================================================================
--- ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/branches/release11.04/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Fri Jun  3 19:45:25 2011
@@ -73,6 +73,7 @@ import org.ofbiz.entity.util.EntityCrypt
 import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.SequenceUtil;
+//import org.ofbiz.service.ServiceDispatcher;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -88,7 +89,6 @@ public class GenericDelegator implements
 
     protected ModelReader modelReader = null;
     protected ModelGroupReader modelGroupReader = null;
-
     /** This flag is only here for lower level technical testing, it shouldn't be user configurable (or at least I don't think so yet); when true all operations without a transaction will be wrapped in one; seems to be necessary for some (all?) XA aware connection pools, and should improve overall stability and consistency */
     public static final boolean alwaysUseTransaction = true;
 
@@ -105,6 +105,7 @@ public class GenericDelegator implements
     protected Map<?,?> andCacheFieldSets = FastMap.newInstance();
 
     protected DistributedCacheClear distributedCacheClear = null;
+    protected boolean enableJMS = true;    
     protected EntityEcaHandler<?> entityEcaHandler = null;
     protected SequenceUtil sequencer = null;
     protected EntityCrypto crypto = null;
@@ -308,7 +309,10 @@ public class GenericDelegator implements
             try {
                 Class<?> eecahClass = loader.loadClass(entityEcaHandlerClassName);
                 this.entityEcaHandler = UtilGenerics.cast(eecahClass.newInstance());
+                boolean isJmsEnabled = getEnabledJMS();
+                enableJMS(!getDelegatorInfo().useDistributedCacheClear); // To avoid duplicated JMS listeners (OFBIZ-4296)
                 this.entityEcaHandler.setDelegator(this);
+               enableJMS(isJmsEnabled);
             } catch (ClassNotFoundException e) {
                 Debug.logWarning(e, "EntityEcaHandler class with name " + entityEcaHandlerClassName + " was not found, Entity ECA Rules will be disabled", module);
             } catch (InstantiationException e) {
@@ -2836,4 +2840,19 @@ public class GenericDelegator implements
             Debug.logVerbose("Distributed Cache Clear System disabled for delegator [" + delegatorFullName + "]", module);
         }
     }
+    
+
+    /* (non-Javadoc)
+     * @see org.ofbiz.entity.Delegator#enableJMS()
+     */
+    public void enableJMS(boolean enable) {
+        this.enableJMS = enable;
+    }
+
+    /* (non-Javadoc)
+     * @see org.ofbiz.entity.Delegator#getEnableJMS()
+     */
+    public boolean getEnabledJMS() {
+        return this.enableJMS;
+    }
 }

Propchange: ofbiz/branches/release11.04/framework/security/data/PasswordSecurityData.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/applications/securityext/data/PasswordSecurityData.xml:951708-952957
 /ofbiz/branches/jquery/applications/securityext/data/PasswordSecurityData.xml:952958-1044489
 /ofbiz/branches/multitenant20100310/applications/securityext/data/PasswordSecurityData.xml:921280-927264
-/ofbiz/trunk/framework/security/data/PasswordSecurityData.xml:1100197,1100880,1104423
+/ofbiz/trunk/framework/security/data/PasswordSecurityData.xml:1100197,1100880,1104423,1131144

Modified: ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/ServiceDispatcher.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=1131164&r1=1131163&r2=1131164&view=diff
==============================================================================
--- ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original)
+++ ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Fri Jun  3 19:45:25 2011
@@ -116,7 +116,7 @@ public class ServiceDispatcher {
         }
 
         // make sure we haven't disabled these features from running
-        if (enableJMS) {
+        if (enableJMS && this.delegator.getEnabledJMS()) {
             this.jlf = new JmsListenerFactory(this);
         }
 
@@ -1100,7 +1100,7 @@ public class ServiceDispatcher {
     }
 
     /**
-     * Enabled/Disables the Job Manager/Scheduler globally
+     * Enables/Disables the Job Manager/Scheduler globally
      * (this will not effect any dispatchers already running)
      * @param enable
      */
@@ -1109,7 +1109,7 @@ public class ServiceDispatcher {
     }
 
     /**
-     * Enabled/Disables the JMS listeners globally
+     * Enables/Disables the JMS listeners globally
      * (this will not effect any dispatchers already running)
      * @param enable
      */
@@ -1117,8 +1117,17 @@ public class ServiceDispatcher {
         ServiceDispatcher.enableJMS = enable;
     }
 
+
+    /**
+     * Get Enabled/Disabled JMS listeners status
+     * @return boolean true is JMS listeners are enabled
+     */
+    public static boolean getEnableJMS() {
+        return ServiceDispatcher.enableJMS;
+    }
+
     /**
-     * Enabled/Disables the startup services globally
+     * Enables/Disables the startup services globally
      * (this will not effect any dispatchers already running)
      * @param enable
      */

Propchange: ofbiz/branches/release11.04/specialpurpose/ebaystore/lib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/specialpurpose/ebaystore/lib:951708-952957
 /ofbiz/branches/jquery/specialpurpose/ebaystore/lib:952958-1044489
 /ofbiz/branches/multitenant20100310/specialpurpose/ebaystore/lib:921280-927264
-/ofbiz/trunk/specialpurpose/ebaystore/lib:1100197,1100880,1104423
+/ofbiz/trunk/specialpurpose/ebaystore/lib:1100197,1100880,1104423,1131144

Propchange: ofbiz/branches/release11.04/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-952957
 /ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:952958-1044489
 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:1100197,1100880,1104423
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:1100197,1100880,1104423,1131144

Propchange: ofbiz/branches/release11.04/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-952957
 /ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:952958-1044489
 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:1100197,1100880,1104423
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:1100197,1100880,1104423,1131144

Propchange: ofbiz/branches/release11.04/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  3 19:45:25 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-952957
 /ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:952958-1044489
 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:1100197,1100880,1104423
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:1100197,1100880,1104423,1131144