Author: jonesde
Date: Tue Sep 12 14:03:10 2006 New Revision: 442704 URL: http://svn.apache.org/viewvc?view=rev&rev=442704 Log: Some fixes for the distributed cache clear services, and the default OpenJMS configuration; contributed by Peter Goron, old Undersun Jira #OFBIZ-876 Modified: incubator/ofbiz/trunk/framework/base/config/jndiservers.xml incubator/ofbiz/trunk/framework/entityext/servicedef/services.xml incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/cache/EntityCacheServices.java Modified: incubator/ofbiz/trunk/framework/base/config/jndiservers.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/base/config/jndiservers.xml?view=diff&rev=442704&r1=442703&r2=442704 ============================================================================== --- incubator/ofbiz/trunk/framework/base/config/jndiservers.xml (original) +++ incubator/ofbiz/trunk/framework/base/config/jndiservers.xml Tue Sep 12 14:03:10 2006 @@ -30,8 +30,8 @@ security-credentials=""/> <jndi-server name="OpenJMS" - context-provider-url="rmi://127.0.0.1:1099/JndiServer" - initial-context-factory="org.exolab.jms.jndi.rmi.RmiJndiInitialContextFactory"/> + context-provider-url="rmi://127.0.0.1:1099" + initial-context-factory="org.exolab.jms.jndi.InitialContextFactory"/> <!-- Note that in most cases this is not necessary or desired for Orion, the default above is easier/better --> <jndi-server name="localorion" Modified: incubator/ofbiz/trunk/framework/entityext/servicedef/services.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entityext/servicedef/services.xml?view=diff&rev=442704&r1=442703&r2=442704 ============================================================================== --- incubator/ofbiz/trunk/framework/entityext/servicedef/services.xml (original) +++ incubator/ofbiz/trunk/framework/entityext/servicedef/services.xml Tue Sep 12 14:03:10 2006 @@ -29,7 +29,7 @@ <!-- Below uses Group/HTTP engine <service name="distributedClearAllEntityCaches" engine="group" location="distributedClearAllEntityCaches" invoke=""/> --> - <service name="clearAllEntityCaches" engine="java" + <service name="clearAllEntityCaches" engine="java" export="true" location="org.ofbiz.entityext.cache.EntityCacheServices" invoke="clearAllEntityCaches" auth="true"> <description>Clears all values from all Entity Engine caches. By default does not distribute.</description> <attribute name="distribute" type="Boolean" mode="IN" optional="true"/> @@ -42,8 +42,8 @@ <!-- Below uses Group/HTTP engine <service name="distributedClearCacheLineByValue" engine="group" location="distributedClearCacheLineByValue" invoke=""/> --> - <service name="clearCacheLineByValue" engine="java" - location="org.ofbiz.extentity.cache.EntityCacheServices" invoke="clearCacheLine" auth="true"> + <service name="clearCacheLineByValue" engine="java" export="true" + location="org.ofbiz.entityext.cache.EntityCacheServices" invoke="clearCacheLine" auth="true"> <description>Clear Cache Line with a value (GenericValue); this is the preferred method since the all, by primary key and by and caches will be cleared. By default does not distribute.</description> <attribute name="value" type="GenericValue" mode="IN" optional="false"/> <attribute name="distribute" type="Boolean" mode="IN" optional="true"/> @@ -56,8 +56,8 @@ <!-- Below uses Group/HTTP engine <service name="distributedClearCacheLineByDummyPK" engine="group" location="distributedClearCacheLineByDummyPK" invoke=""/> --> - <service name="clearCacheLineByDummyPK" engine="java" - location="org.ofbiz.extentity.cache.EntityCacheServices" invoke="clearCacheLine" auth="true"> + <service name="clearCacheLineByDummyPK" engine="java" export="true" + location="org.ofbiz.entityext.cache.EntityCacheServices" invoke="clearCacheLine" auth="true"> <description>Clear Cache Line with a dummyPK (GenericEntity); clears that all cache entry and depending on whether the dummyPK is a primaryKey or not this clears the by primary key cache or the specified entry in the by and cache. By default does not distribute.</description> <attribute name="dummyPK" type="GenericEntity" mode="IN" optional="false"/> <attribute name="distribute" type="Boolean" mode="IN" optional="true"/> @@ -71,10 +71,24 @@ <!-- Below uses Group/HTTP engine <service name="distributedClearCacheLineByPrimaryKey" engine="group" location="distributedClearCacheLineByPrimaryKey" invoke=""/> --> - <service name="clearCacheLineByPrimaryKey" engine="java" + <service name="clearCacheLineByPrimaryKey" engine="java" export="true" location="org.ofbiz.entityext.cache.EntityCacheServices" invoke="clearCacheLine" auth="true"> <description>Clear Cache Line with a primaryKey (GenericPK); clears the all and by primary key caches. By default does not distribute.</description> <attribute name="primaryKey" type="GenericPK" mode="IN" optional="false"/> + <attribute name="distribute" type="Boolean" mode="IN" optional="true"/> + </service> + + <service name="distributedClearCacheLineByCondition" engine="jms" location="serviceMessenger" invoke="clearCacheLineByCondition" auth="true"> + <description>Clear Cache Line by condition for all Servers listening to the topic</description> + <attribute name="entityName" type="String" mode="IN" optional="false"/> + <attribute name="condition" type="org.ofbiz.entity.condition.EntityCondition" mode="IN" optional="false"/> + <attribute name="distribute" type="Boolean" mode="IN" optional="true"/> + </service> + <service name="clearCacheLineByCondition" engine="java" export="true" + location="org.ofbiz.entityext.cache.EntityCacheServices" invoke="clearCacheLine" auth="true"> + <description>Clear Cache Line with a condition; By default does not distribute.</description> + <attribute name="entityName" type="String" mode="IN" optional="false"/> + <attribute name="condition" type="org.ofbiz.entity.condition.EntityCondition" mode="IN" optional="false"/> <attribute name="distribute" type="Boolean" mode="IN" optional="true"/> </service> Modified: incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/cache/EntityCacheServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/cache/EntityCacheServices.java?view=diff&rev=442704&r1=442703&r2=442704 ============================================================================== --- incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/cache/EntityCacheServices.java (original) +++ incubator/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/cache/EntityCacheServices.java Tue Sep 12 14:03:10 2006 @@ -120,7 +120,7 @@ } try { - this.dispatcher.runAsync("distributedClearCacheLineByCondition", UtilMisc.toMap("entityName", entityName, "condition", condition), false); + this.dispatcher.runAsync("distributedClearCacheLineByCondition", UtilMisc.toMap("entityName", entityName, "condition", condition, "userLogin", userLogin), false); } catch (GenericServiceException e) { Debug.logError(e, "Error running the distributedClearCacheLineByCondition service", module); } |
Free forum by Nabble | Edit this page |