Hello,
I'm a newbie with JBossCache and JBoss AOP.
I sucessfully set up a jboss aop cache service and accessed the cache inside a session bean with the following snipet :
MBeanServer server = MBeanServerLocator.locate();
TreeCacheAopMBean cache = (TreeCacheAopMBean) MBeanProxyExt.create(
TreeCacheAopMBean.class,
"jboss.cache:service=TreeCacheAop",
server);
I also successfully added an instance of the tutorial POJO to the cache ( Person with Address detail) and retrieved it later through another call. No problem !
But I do not understand how I managed to have it make working. 1/ I added an EMPTY jboss-aop.xml file to the META-INF directory of my EJB jar file containing the session bean.
The tutorial provides an out-of-date
advisable tag for the Address and Person classes. I commented it; this is how my jboss-aop.xml deployed with the EJB jar file file became "empty" :
<aop>
<!--
<advisable class="com.rubis.app.cache.bean.Address"
fieldFilter="ALL"
methodFilter="ALL"
constructorFilter="ALL"
/>
<advisable class="com.rubis.app.cache.bean.Person"
fieldFilter="ALL"
methodFilter="ALL"
constructorFilter="ALL"
/>
-->
</aop>
2/ I configured JBoss AOP with
no load time configuration (the jboss-service.xml file of my jboss-aop.deployer archive sets EnableTransformer to
false, as it is proposed by default by JBoss 4.0.0). In principle, AOP precompilation of Address and Person should have been done. But I did not use the AOP precompiler. I understand I should have, says the tutorial.
Note: if I set EnableTransformer to true, I cannot start JBoss 4.0.0 inside Eclipse. JBoss is then super-slow and I also get Out Of Memory errors. Even if I extend my heap space when starting Eclipse. Therefore I keep EnableTransformer set to false. How did my sample work ? Can you provide me with some input about this ?
Fred