You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ronald Tetsuo Miura (JIRA)" <ji...@apache.org> on 2009/08/31 04:01:32 UTC

[jira] Updated: (WICKET-2444) Internal Spring beans should be ignored

     [ https://issues.apache.org/jira/browse/WICKET-2444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ronald Tetsuo Miura updated WICKET-2444:
----------------------------------------

    Attachment: SpringBeanLocator.patch

Simple patch to ignore beans of the cases described in the issue. It would be better if it was configurable or overridable, but I'm not sure what is the best way to do this, since the class is instantiated internally, and there are no hooks.

> Internal Spring beans should be ignored
> ---------------------------------------
>
>                 Key: WICKET-2444
>                 URL: https://issues.apache.org/jira/browse/WICKET-2444
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>    Affects Versions: 1.4.1
>            Reporter: Ronald Tetsuo Miura
>            Priority: Minor
>         Attachments: SpringBeanLocator.patch
>
>
> When looking up Spring beans by type (to inject into @SpringBean fields), the injector should ignore internal beans, like the ones generated by the <aop:scoped-proxy/> element at the configuration. In this case, the generated name always starts with 'scopedTarget.'.
> Other cases can be identified by the method 'BeanFactoryUtils.isFactoryDereference(name)'.
> These beans are created by the container to be used internally, so, shouldn't be considered for injection. The problem is, they usually have a mirror bean (which is the really injected by the container), so, when Wicket's injector tries to find it, it doesn't find unique beans of the type, forcing us to declare the bean name explicitly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.