Dear All,
We’ve an application based on Spring/Hibernate stack that is deployed on WebLogic cluster.
Also we’d like to use Ehcache in replication mode, i.e. each Weblogic node has its own Ehcache instance running with JVM and Ehcache replication takes care about the cache consistency across the cluster.
We also would like to use WebLogic JMS for replication b/w Ehcache nodes in cluster (because our app is already using JMS).
We also have JTA/XA mode enabled as our app uses both JDBC and JMS resources plus we want Ehcache to stay in sync with states of application transactions and handle it consistently.
Can you please confirm if above configuration can be supported by the Ehcache (open-source) product ?
Below are bit more details about our application:
JVM 1.7 64bit Linux (build 1.7.0_79-b15)
WebLogic Server 12c (build 12.1.3.0.0)
Oracle Database 12c Enterprise Edition Release RAC (build 12.1.0.2.0)
Hibernate 4.2.6
Spring 3.2.13
Ehcache 2.4.3 (ehcache-jmsreplication 0.3)
Here are some problems that we already observer with this setup:
Problem 1:
JMS replication seems doesn’t work at all when Ehcache transactional mode is set to “xa”. We don’t observe cache changes propagated b/w nodes.
Problem 2:
When we remove transactionalMode=”xa” setting from configuration, replication seems to work but we see strange exceptions originated from ehcache in case when our XA transactions are rolled back (due to other factors), which makes us to think it’s not working as expected
Aug 22, 2016 9:50:18 AM net.sf.ehcache.distribution.jms.JMSCachePeer send
SEVERE: weblogic.messaging.kernel.KernelException: Error enlisting GXA transaction
weblogic.jms.common.JMSException: weblogic.messaging.kernel.KernelException: Error enlisting GXA transaction
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncTran(DispatcherAdapter.java:53)
at weblogic.jms.client.JMSProducer.toFEProducer(JMSProducer.java:1300)
at weblogic.jms.client.JMSProducer.deliveryInternal(JMSProducer.java:807)
at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:543)
at weblogic.jms.client.JMSProducer.sendWithListener(JMSProducer.java:394)
at weblogic.jms.client.JMSProducer.send(JMSProducer.java:384)
at weblogic.jms.client.WLProducerImpl.send(WLProducerImpl.java:970)
at net.sf.ehcache.distribution.jms.JMSCachePeer.send(JMSCachePeer.java:229)
at net.sf.ehcache.distribution.jms.JMSCacheReplicator.sendNotification(JMSCacheReplicator.java:429)
at net.sf.ehcache.distribution.jms.JMSCacheReplicator.replicatePut(JMSCacheReplicator.java:301)
at net.sf.ehcache.distribution.jms.JMSCacheReplicator.notifyElementUpdated(JMSCacheReplicator.java:290)
at net.sf.ehcache.event.RegisteredEventListeners.notifyElementUpdated(RegisteredEventListeners.java:120)
at net.sf.ehcache.Cache.notifyPutInternalListeners(Cache.java:1444)
at net.sf.ehcache.Cache.putInternal(Cache.java:1438)
at net.sf.ehcache.Cache.put(Cache.java:1367)
at net.sf.ehcache.Cache.put(Cache.java:1339)
Thanks,
Sergey Pichkurov