Hi,
we are setting up a cluster of ofbiz(opentaps) instances for load balancing. Both the instances will point to the same database. We want the entity cache to be consistent across both the instances. From the documentation, I gather that we need to set * distributed-cache-clear-enabled="true"* in entity-engine.xml. We also set the *distributed-cache-clear-class-name as org.ofbiz.entityext.cache.EntityCacheServices* Even after doing so, the cache on the other instance is not getting cleared for a particular entity under observation. Do I need to set up a JMS server? How do I tell ofbiz / entity engine cache which JMS server should it look up and what topic it should publish to? How do I configure ofbiz / entity engine which JMS server it should lookup and the topic it needs to subscribe to? In services.xml, I see the engine as JMS. How does this service get invoked on the other instance ? <service name="distributedClearCacheLineByValue" engine="*jms*" location="serviceMessenger" invoke="clearCacheLineByValue" auth="true"> <description>Clear Cache Line by value for all Servers listening to the topic</description> <attribute name="value" type="org.ofbiz.entity.GenericValue" mode="IN" optional="false"/> </service> Any help / pointers are appreciated Thanks in advance, Vijay |
Setting up the ActiveMQ server with opentaps :
0)Start the activeMQ server locally and copy the all-activeMq jar to the framework/base/lib change the name of dispatcher in abstractjmslistener.java from "JMSDispatcher" to "entity-default" 1) in jndiservers.xml :61616" initial-context-factory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/> 2) in jndi.properties java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory java.naming.provider.url=tcp://:61616 topic.OFBTopic=OFBTopic connectionFactoryNames = connectionFactory, queueConnectionFactory,topicConnectionFactory 3) in serviceengine.xml 4) in entityengine.xml -- View this message in context: http://ofbiz.135035.n4.nabble.com/Distributed-Cache-Clear-for-entity-cache-tp3222828p3346065.html Sent from the OFBiz - User mailing list archive at Nabble.com. |
In reply to this post by Vijay A
Setting up the ActiveMQ server with opentaps :
0)Start the activeMQ server locally and copy the all-activeMq jar to the framework/base/lib change the name of dispatcher in abstractjmslistener.java from "JMSDispatcher" to "entity-default" 1) in jndiservers.xml
jndi-server name="ActiveMQ"
context-provider-url="tcp:// 2) in jndi.properties java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url=tcp:// topic.OFBTopic=OFBTopic connectionFactoryNames = connectionFactory, queueConnectionFactory,topicConnectionFactory 3) in serviceengine.xml jms-service name="serviceMessenger" send-mode="all" server jndi-server-name="ActiveMQ" jndi-name="topicConnectionFactory" topic-queue="OFBTopic" type="topic" username="system" password="manager" listen="true"/ /jms-service 4) in entityengine.xml delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="true" |
Administrator
|
In reply to this post by Anand H I
There is currently an issue in OFBiz trunk, but, I guess, it's not related to Opentaps
https://issues.apache.org/jira/browse/OFBIZ-3987 Jacques From: "Anand H I" <[hidden email]> > Setting up the ActiveMQ server with opentaps : > 0)Start the activeMQ server locally and copy the all-activeMq jar to the > framework/base/lib > > change the name of dispatcher in abstractjmslistener.java from > "JMSDispatcher" to "entity-default" > > > 1) > in jndiservers.xml > :61616" > > initial-context-factory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/> > > 2) > in jndi.properties > java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory > java.naming.provider.url=tcp://:61616 > topic.OFBTopic=OFBTopic > connectionFactoryNames = connectionFactory, > queueConnectionFactory,topicConnectionFactory > > 3) > in serviceengine.xml > > > > > > 4) > > in entityengine.xml > > > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/Distributed-Cache-Clear-for-entity-cache-tp3222828p3346065.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Administrator
|
In reply to this post by Anand H I
Thanks Anand,
Your message was very useful to fix some bugs... Still on it... Jacques |
Free forum by Nabble | Edit this page |