Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ-based cache in a Cluster

AspectJ aspects (like any regular Java object) know nothing about the cluster. So if you keep your state (the cached data) directly in fields of the aspect instance, you will have one aspect instance (and hence one cache) per JVM. You'll need to use a clustering product such as Tangosol Coherence, Terracotta, or Gigaspaces to get a clustered cache. For Coherence or Gigaspaces the aspect should act as a controller (coordinating cache gets/puts), delegating to a cache object that the aspect has been configured with. Terracotta works a little differently and clusters object state directly :- so if using Terracotta you would designate the field anchoring the entity bean data as a "shared root". (Terracotta uses AOP technology - AspectWerkz - under the covers so you don't have to).

Regards, Adrian.

On 9 Oct 2006, at 16:18, Marco Mistroni wrote:

hello all,
 i was wondering how Aspects behave in a cluster..
i plan to implement a cache of some Entity beans data using AspectJ, By usign an aspect that has system-scope, but i was wondering what would be the behaviour in a cluster.........
anyone can comment on that?

thanks in advance and regards
 marco
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top