You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ingram Chen (JIRA)" <ji...@apache.org> on 2006/11/01 17:43:16 UTC
[jira] Created: (WICKET-28) Add an option to turn off beans check
in SpringBeanLocator
Add an option to turn off beans check in SpringBeanLocator
----------------------------------------------------------
Key: WICKET-28
URL: http://issues.apache.org/jira/browse/WICKET-28
Project: Wicket
Issue Type: New Feature
Components: wicket-spring
Reporter: Ingram Chen
In wicket 1.2.3, SpringBeanLocator.lookupSpringBean() force check all injected bean:
if (beans.size() == 0)
throw new IllegalStateException("bean of type [" + clazz.getName()
+ "] not found");
This check is good for production. But in test environment, it would be better that
we can turn off this check somewhere since test case does not always
prepare non-tested bean.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (WICKET-28) Add an option to turn off beans check
in SpringBeanLocator
Posted by "Ingram Chen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/WICKET-28?page=comments#action_12446306 ]
Ingram Chen commented on WICKET-28:
-----------------------------------
It seems that only AnnotApplicationContextMock utilizes SpringBeanLocator.
so it is enough that adding option to AnnotApplicationContextMock to tweak SpringBeanLocator.
(may be make it as default ?)
> Add an option to turn off beans check in SpringBeanLocator
> ----------------------------------------------------------
>
> Key: WICKET-28
> URL: http://issues.apache.org/jira/browse/WICKET-28
> Project: Wicket
> Issue Type: New Feature
> Components: wicket-spring
> Reporter: Ingram Chen
>
> In wicket 1.2.3, SpringBeanLocator.lookupSpringBean() force check all injected bean:
> if (beans.size() == 0)
> throw new IllegalStateException("bean of type [" + clazz.getName()
> + "] not found");
> This check is good for production. But in test environment, it would be better that
> we can turn off this check somewhere since test case does not always
> prepare non-tested bean.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (WICKET-28) Add an option to turn off beans check
in SpringBeanLocator
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-28?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-28.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.0
1.3
Assignee: Igor Vaynberg
> Add an option to turn off beans check in SpringBeanLocator
> ----------------------------------------------------------
>
> Key: WICKET-28
> URL: https://issues.apache.org/jira/browse/WICKET-28
> Project: Wicket
> Issue Type: New Feature
> Components: wicket-spring
> Reporter: Ingram Chen
> Assigned To: Igor Vaynberg
> Fix For: 1.3, 2.0
>
> Attachments: wicket-spring-fail-fast-patch.txt
>
>
> In wicket 1.2.3, SpringBeanLocator.lookupSpringBean() force check all injected bean:
> if (beans.size() == 0)
> throw new IllegalStateException("bean of type [" + clazz.getName()
> + "] not found");
> This check is good for production. But in test environment, it would be better that
> we can turn off this check somewhere since test case does not always
> prepare non-tested bean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-28) Add an option to turn off beans check
in SpringBeanLocator
Posted by "Joni Freeman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-28?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joni Freeman updated WICKET-28:
-------------------------------
Attachment: wicket-spring-fail-fast-patch.txt
Yes, it is a smart default, works well in production mode but is major pita when unit testing. The attached patch adds a method (setFailFast) which can be used to disable fail fast from AnnotProxyFieldValueFactory.
> Add an option to turn off beans check in SpringBeanLocator
> ----------------------------------------------------------
>
> Key: WICKET-28
> URL: https://issues.apache.org/jira/browse/WICKET-28
> Project: Wicket
> Issue Type: New Feature
> Components: wicket-spring
> Reporter: Ingram Chen
> Attachments: wicket-spring-fail-fast-patch.txt
>
>
> In wicket 1.2.3, SpringBeanLocator.lookupSpringBean() force check all injected bean:
> if (beans.size() == 0)
> throw new IllegalStateException("bean of type [" + clazz.getName()
> + "] not found");
> This check is good for production. But in test environment, it would be better that
> we can turn off this check somewhere since test case does not always
> prepare non-tested bean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.