[jboss-user] [JBoss AOP] - How to use AOP to simulate an alternative method of a existi

vola do-not-reply at jboss.com
Wed Jul 18 10:43:50 EDT 2007


Hi all,

Our team is trying to use JBoss AOP to do effecting on a running J2EE application. Let say one class "ShoppingCart" of the application has a method called "addItem()". Our goal is to AOP to "around" the "addItem()", and use our own "addItemAlternative()". Everything works fine, just one question, is that possible we can access the private members of "ShoppingCart" in our AOP Interceptor class?

I know that AOP can retrieve the arguments passed into the "addItem()". But if we don't know the private members of "ShoppingCart", we have no way to do the similar operation as original method does. So, is that possible? Or, can we use any other AOP feature to simulate a method?

Thank you

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065410#4065410

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065410



More information about the jboss-user mailing list