"rkadayam" wrote : Thanks I'll give that a shot. | | I have some related questions | | 0. Can I reference interceptors, pointcuts just by name instead of their expressions and class-name? I guess I'm just looking for the DTD :-) |
Yes. Look in the tutorial in the WIKI for info on named pointcuts. Everything definable in XML can take a name attribute. Sorry, but I've never written a DTD yet. Something more I have to do before final release. "rkadayam" wrote : | 1. Can I add interceptors by name to the Aspect system without binding to a pointcut? I saw a previous version of the XML that could do this. | Same XML works. | <interceptor name="BillsIntercetor" class="org.jboss.BillsInterceptor"/> | <bind ....> | <interceptor-ref name="BillsInterceptor"/> | </bind> | "rkadayam" wrote : | 2. Similarly I'd like to add a pointcut to the Aspect system without any bindings. I guess AspectManager.addPointcut() should do that trick. ok | Yes see tutorial for how to name pointcuts and have them separate from bindings. "rkadayam" wrote : | 3. And then I'll probably try to create an AdviceBinding(name,pointcut,null,null,null).addInterceptor(<interceptor-name>) and then add this to AspectManager. | | 4. If I want to add more at a later time, I'm not sure how I can get access to that old AdviceBinding? AspectManager.getBindings() returned a bunch of strings, are they some sort of references? | | 4. Now, how do I remove a single interceptor from the binding? I could do AspectManager.removeBinding(name) but what is that name? | You cannot remove an advice or interceptor from a binding. You have to redeploy the whole binding. JBoss AOP automatically generates names for interceptors and bindings based on the XML file name and a random number. Take a look at org.jboss.aop.AspectXmlLoader to see how XML is parsed and how it populates. If you have suggestions for expanding the API, feel free to play with the code and then submit it. Or post your API change suggestions on a different topic. You probably want an addInterceptor method on AspectManager. There is an addInterceptorFactory. "rkadayam" wrote : | 5. Are there possibilities to run into some name conflicts? Or do you generate some unique keys for the interceptor, aspect and pointcut elements? | | Thanks a bunch !! | rajiv | | PS: I'm building some tools using the interceptor concept of AOP for some monitoring type tasks. This is cool stuff !! There is the possibility of running into name conflicts if you name the pointcuts, interceptors, aspect, or bindings yourself. Bill View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3828476#3828476 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3828476 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
