[jboss-user] [JBossCache] - Re: CacheLoader is not notified when a POJO is modified
dmary
do-not-reply at jboss.com
Wed Dec 5 09:32:00 EST 2007
Hi,
I've got no response so I will precise more detail :) :
- i'm running with JBoss 4.0.5 GA
- i've got the JbossCache 1.4.0 SP1 dist
I've read all tutorials on JBossCache (TreeCache and PojoCache), i've read the wiki (PojoCacheAS405) and I didn't understand why any interceptor is called when I modifity one field of my POJO.
->
I've got 3 POJOs : object A contains object B which also contains object C
The object A use @InstanceOfPojoCacheable and object B and C use @PojoCacheable
I've reached the instance of PojoCache throught a Mbean
MBeanServer server = MBeanServerLocator.locateJBoss();
| try {
| this.cache = (PojoCacheMBean) MBeanProxyExt.create(PojoCacheMBean.class, "jboss.cache:service=MyPojoCache", server);
| this.cache.addTreeCacheListener(new MyCacheListener());
| } catch (MalformedObjectNameException e) {
| e.printStackTrace();
| }
I put my object in cache with putobject :
public void putMobileUnit(ObjectA item) {
| try {
| this.cache.putObject(NODE+item.getImei(), item);
| } catch (CacheException e) {
| e.printStackTrace();
| }
| }
In one hand, reading tutorials, the annotation @InstanceOfPojoCacheable and @PojoCacheable is the only need (i've reached this point) to have AOP worked, in other hand, as it is said on wiki PojoCacheAS405, we need to specify precisly the classes needed to be instrumented/aspectized in jboss-aop.xml and choose between make a Ant script to make a compile-time instrumentation or to do a load time instrumentation.
Why ? Instrumentation isn't done by only write annotations ?
What aopc task really do ?
Thanks a lot for ur responses !!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110539#4110539
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110539
More information about the jboss-user
mailing list