Hi Guys, I finally make CacheAOP to work as MBean in JBoss 4.0, my jboss-aop.xml aspectized configuration file is
1. jboss-aop.xml <?xml version="1.0" encoding="UTF-8"?> | <aop> | <!-- This is declaration file for annotation. We are using JDK1.4 now, | so an annotationc pre-compiler is needed for JBossAop. | See build.xml target annoc for details. | Idea is user will then need only to annotate like: | @@org.jboss.cache.aop.AopMarker | in his POJO. There will be no need of jboss-aop.xml from user's side. | Only extra step is annotation compiling. And in JDK1.5, this step | will not be needed since the implicit annotation support. | | For example, see either Address or Person. | --> | | <!-- If a POJO has AopMarker annotation, it will be asepctized. --> | <prepare expr="field(* @org.jboss.cache.aop.AopMarker->*)" /> | | <!-- | Supports inheritance and polymorphism. It can either be a concrete class | or an interface. All sub-classes or interface implementors will be instrumeneted. | --> | <prepare expr="field(* [EMAIL PROTECTED]>*)" /> | </aop> | My question is what would be preferred way to do conf file, can I stick with this or doing customized config is prefferable. 2. At client I need to use aspectized classes(classes for which AOPC is done), if I run without using any aop specific jars I got java.lang.NoClassDefFoundError: org/jboss/aop/joinpoint/FieldWriteInvocation | at java.lang.ClassLoader.defineClass0(Native Method) | at java.lang.ClassLoader.defineClass(ClassLoader.java:537) | at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) | at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) | at java.net.URLClassLoader.access$100(URLClassLoader.java:55) | at java.net.URLClassLoader$1.run(URLClassLoader.java:194) | at java.security.AccessController.doPrivileged(Native Method) | at java.net.URLClassLoader.findClass(URLClassLoader.java:187) | at java.lang.ClassLoader.loadClass(ClassLoader.java:289) | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) | at java.lang.ClassLoader.loadClass(ClassLoader.java:235) | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) | at com.wdpro.commerce.wdw.be.client.delegate.WDWIBCAppDelegate.getAnswer(WDWIBCAppDelegate.java:206) | at TestCache.main(TestCache.java:10) | Exception in thread "main" | Is there any subset of jars I need to include for client classpath if client wants to use aspectized classes(Cached classes), if so is this set would be constants so I can deliver to client only first time. 3. I tried to use "/usr/template/hotel/" as FQN but it didn't take it took "/usr/template/", is there any restrictions around FQN patterns 4. Right now I am looking TreeCacheAOP using MBeanProxy instead of JNDI name, thoough I defined JNDI name for Tree Cache AOP I am't able to use it. part of tree-aop-service.xml | | | <mbean | code="org.jboss.invocation.jrmp.server.JRMPProxyFactory" | name="mydomain:service=proxyFactory,type=jrmp,target=factory"> | <attribute | name="InvokerName">jboss:service=invoker,type=jrmp</attribute> | <attribute | name="TargetName">jboss.cache:service=TreeCacheAop</attribute> | <attribute name="JndiName">MyCache</attribute> <attribute | name="InvokeTargetMethod">true</attribute> <attribute | name="ExportedInterface">org.jboss.cache.aop.TreeCacheAopMBean</attribute> | <attribute name="ClientInterceptors"> <iterceptors> | <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor> | <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor> | <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor> | </iterceptors> </attribute> | <depends>jboss:service=invoker,type=jrmp</depends> | <depends>jboss.cache:service=TreeCacheAop</depends> | </mbean> | | Context ctx= new Context(); TreeCacheAop sam = ctz.lookup("MyCache"); it's finding JNDI but throwing class cast exception. What would be procedure to do look up for Tree Cache AOP MBean via JNDI. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922375#3922375 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922375 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user