thank you, your last post helped me get there, although I had to modify the 
code some to get it working, since I got a classCastException when running it 
at first.


  | public Object fieldIntercept(Invocation inv) throws Throwable {
  |        if(inv instanceof FieldReadInvocation) {
  |                Object value = inv.invokeNext();
  |                System.out.println("Value :" + value.toString());
  |                return value;
  |        }
  |        else return inv.invokeNext();
  | }   
  | 

But how would I go about also catching writes to a field?
I tried to change the line


  | if(inv instanceof FieldReadInvocation) {
  | 

to


  | if(inv instanceof FieldReadInvocation || inv  instanceof 
FieldWriteInvocation) {
  | 

but that gave me a nullPointerException...

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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to