[jboss-user] [JBoss AOP] - Re: Is there a static vs. dynamic binding problem with jboss
manu4ever
do-not-reply at jboss.com
Tue Aug 29 13:00:47 EDT 2006
Actually I was wrong to say that it was reading SUBPOJO.field. It's actually reading POJO.field. The problem is that when I try to write to SUBPOJO.field, the code is rewritten by jboss AOP in such a way that it writes to POJO.field instead.
The problem seems to be the mechanism used to intercept field accesses. Static methods for read and write accesses to POJO.field are added to POJO. However in SUBPOJO, the same static methods in POJO are used again when attempting to access SUBPOJO.field.
So in the example above, what is actually happening is that the constructor for SUBPOJO is correctly calling POJO's constructor with an arg of 1, but is then calling POJO.field_r_$aop() or whatever it's called, in the misguided belief that this will set SUBPOJO.field, or that the two are the same which they obviously aren't.
Comments?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968147#3968147
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968147
More information about the jboss-user
mailing list