On Mar 12, 2012, at 5:15 AM, [email protected] wrote:

> +++ 
> openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java
>  Mon Mar 12 10:15:49 2012
> 
> +    private boolean hasField(final Class<?> clazz, final String name) {
> +        Class<?> current = clazz;
> +        while (current != null && !Object.class.equals(current)) {
> +            try {
> +                current.getDeclaredField(name);
> +                return true;
> +            } catch (NoSuchFieldException e) {
> +                // ignored
> +            }
> +        }
> +        return false;
> +    }

FYI, infinite loop.  "current" is never updated. :)

In general we can move all this special processing to the ConfigurationFactory 
side of things.  With one DynamicDeployer impl you could check if the bean is 
an @Proxy bean then check the handler for the specified field and add an 
env-entry of type java.lang.Class with the correct injection-target.


-David

Reply via email to