From: oberon777 <nu...@jb...> - 2005-06-17 17:48:35
|
I have been using caller aspects successfully until it came to instrumenting calls to some Swing classes. In particular, the method I am instrumenting is javax.swing.JTable->addNotify. The interceptor method looks as follows: | public Object invoke(Invocation invocation) throws Throwable { | // log.println("Hit " + invocation); | | if(invocation instanceof CallerInvocation){ | CallerInvocation cinvocation = (CallerInvocation)invocation; | | process_call(cinvocation); | }else{ | System.err.println("Unexpected " + invocation); | } | | try{ | return invocation.invokeNext(); | }finally{ | //System.err.println("Failed..."); | } | } | and the problem is that the return statement invocation.invokeNext causes method invoke() to be called on the same method as before leading to an infinite loop. Any thoughts? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881969#3881969 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881969 |