Posts

Showing posts with the label ehcache

What is the configurations for enabling `ehcache replication`?

What is the configurations for enabling `ehcache replication`? I have a project that used JPA and Hibernate in DataAccessLayer with OraclDB and WebLogic application server. Also, I provided second-level-cache through ehcache as following configs: second-level-cache ehcache ehcache.xml <ehcache> <diskStore path="java.io.tmpdir"/> <defaultCache> maxEntriesLocalHeap="10000" eternal="false" timeToIdleSeconds="120" timeToLiveSeconds="120" maxEntriesLocalDisk="10000000" diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU"/> <persistence strategy="localTempSwap" </defaultCache> </ehcache> persistence.xml <persistence-unit name="datasource1" transaction-type="JTA"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>my_datasource...

EHCache Local TransactionManager timeout on removal

EHCache Local TransactionManager timeout on removal I am working on a project to incorporate ehCache. Currently I am writing JUnit tests to test the various behaviours. When adding a transaction manager I started seeing timeout issues on certain calls. @Test public void testEHCacheIssue(){ try{ Ehcache ehCache_1 = ehCacheManager.getCache("ehCache_1"); transactionManager = ehCacheManager.getTransactionController(); transactionManager.setDefaultTransactionTimeout(15); transactionManager.begin(); ehCache_1.put(new Element("1", new TestElementPerson(1, "firstName1", "lastName1","email1@test.com",1234))); transactionManager.commit(); transactionManager.begin(); ehCache_1.put(new Element("2", new TestElementPerson(2, "firstName3", "lastName3","email3@test.com",1234))); transactionManager.commit(); transactionManager.begi...