[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Field injection

alesj do-not-reply at jboss.com
Thu Mar 13 08:25:30 EDT 2008


"kabir.khan at jboss.com" wrote : 
  |   |       if (o instanceof org.jboss.aop.proxy.container.AspectManaged)
  |   |       {
  |   |           //It is a proxy
  |   |       }
  |   |       else if (o instanceof org.jboss.aop.Advised)
  |   |       {
  |   |           //It is woven
  |   |       }
  |   |       else
  |   |       {
  |   |          //Plain class
  |   |       }
  |   | 

Do we need such a check?
e.g. JoinpointFactory

  | // perhaps name param is too much
  | boolean isFieldAccesible(Object target, String name);
  | 
Where AOPJpF would do the above mentioned check, and BasicJpF just returned true.
Since relying on ClassInfo.getDeclaredField to do the trick would mean that we would have to do it for the proxy's classinfo.

And since usually EJBs have their fields private, but still want the injection.
I guess we wont be able to do it w/o Field.setAccessible(true)?

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

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



More information about the jboss-dev-forums mailing list