But we have noticed that whenever any changes on the entity, the putCacheKeyIfAbsent method has never invoked. Please, can someone help us to resolve this issue.
]]>P Soma2013-05-29T12:33:36-00:00Re: CacheInterceptor
https://www.eclipse.org/forums/index.php/mv/msg/488164/1061875/#msg_1061875
EclipseLink has its own cache, how are you trying to use EhCache and for what purpose?
Integrating with a third party cache can be complicated, more than just extending CacheInterceptor is required. What have you done so far?
For updates EclipseLink will acquire a lock on the cache key, then update the cached object directly, then release the lock. EclipseLink has a "live" object cache,
so has a different model than get/put as the objects in the cache are interrelated and object identity is maintained.
So if you are putting the object directly in the EhCache they will get update without a put call. You could potential call put from your CacheKeyInterceptor's release method.
But you probably need to put a copy of the object stripped of its relationships in the EhCache. How do you intend to configure EhCache?
Are you using EhCache just as a local cache, or are you trying to use its replicated cache support? How do you intend to serialize your objects if trying to replicate?
]]>James Sutherland2013-06-04T13:23:56-00:00Re: CacheInterceptor
https://www.eclipse.org/forums/index.php/mv/msg/488164/1062444/#msg_1062444
The reason why I am trying to use Ehcache to avoid creating MDB listener, configuring JMS Topic, Specification, message engine and so on and then update information in persistence.xml file related to JMS cache coordination. Ehcache is already provides a support to replicate the changes on one server to other server with minimal configuration in the Cluster environment.
Till now I have implemented a class (e.g. JpcIdentityMapImpl.java) by extending CacheInterceptor and then I have configured in one of the entity (e.g NoteBO) by using @CacheInterceptor annotation. My expectation is that whenever I have updated a description in the NoteBO entity on one server should be replicated on other server within the Cluster environment.
As you suggested, I will try to implement the code to put the object in the Ehcache within CacheKeyInterceptor's of release method and let you know whether the code is working as expected.]]>P Soma2013-06-07T18:00:43-00:00Re: CacheInterceptor
https://www.eclipse.org/forums/index.php/mv/msg/488164/1062978/#msg_1062978
If you are having issues with JMS, try using RMI instead. EclipseLink 2.6 development stream also has support for JGroups.
]]>James Sutherland2013-06-11T15:05:05-00:00