You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Phil Zoio (JIRA)" <de...@tapestry.apache.org> on 2008/10/08 13:13:44 UTC

[jira] Created: (TAPESTRY-2706) TapestrySpring does not support injection of Spring FactoryBeans

TapestrySpring does not support injection of Spring FactoryBeans
----------------------------------------------------------------

                 Key: TAPESTRY-2706
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2706
             Project: Tapestry
          Issue Type: Bug
          Components: tapestry-spring
         Environment: Spring 2.5.5
            Reporter: Phil Zoio
             Fix For: 5.0.16


This applies as of the released 5.0.16.

SpringModuleDef uses BeanFactoryUtils.beanNamesIncludingAncestors(context) to get the list of bean names to inject into Tapestry service registry.

For factory beans, this method returns the bean name prefixed by &

Later calls to context.getBean() using this name return the factory bean instance, rather than the target object needed by the application.

Suggested fix:

Replace

for (final String beanName : BeanFactoryUtils.beanNamesIncludingAncestors(context))
{

with 

for (final String candidate : BeanFactoryUtils.beanNamesIncludingAncestors(context))
{
    final String beanName = (candidate.startsWith("&", candidate.subString(1), candidate);


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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAP5-355) TapestrySpring does not support injection of Spring FactoryBeans

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-355:
-----------------------------------------

    Assignee: Howard M. Lewis Ship

> TapestrySpring does not support injection of Spring FactoryBeans
> ----------------------------------------------------------------
>
>                 Key: TAP5-355
>                 URL: https://issues.apache.org/jira/browse/TAP5-355
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-spring
>         Environment: Spring 2.5.5
>            Reporter: Phil Zoio
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> This applies as of the released 5.0.16.
> SpringModuleDef uses BeanFactoryUtils.beanNamesIncludingAncestors(context) to get the list of bean names to inject into Tapestry service registry.
> For factory beans, this method returns the bean name prefixed by &
> Later calls to context.getBean() using this name return the factory bean instance, rather than the target object needed by the application.
> Suggested fix:
> Replace
> for (final String beanName : BeanFactoryUtils.beanNamesIncludingAncestors(context))
> {
> with 
> for (final String candidate : BeanFactoryUtils.beanNamesIncludingAncestors(context))
> {
>     final String beanName = (candidate.startsWith("&", candidate.subString(1), candidate);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAP5-355) TapestrySpring does not support injection of Spring FactoryBeans

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-355.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 5.0.16)
                   5.1.0.0

> TapestrySpring does not support injection of Spring FactoryBeans
> ----------------------------------------------------------------
>
>                 Key: TAP5-355
>                 URL: https://issues.apache.org/jira/browse/TAP5-355
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-spring
>         Environment: Spring 2.5.5
>            Reporter: Phil Zoio
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.1.0.0
>
>
> This applies as of the released 5.0.16.
> SpringModuleDef uses BeanFactoryUtils.beanNamesIncludingAncestors(context) to get the list of bean names to inject into Tapestry service registry.
> For factory beans, this method returns the bean name prefixed by &
> Later calls to context.getBean() using this name return the factory bean instance, rather than the target object needed by the application.
> Suggested fix:
> Replace
> for (final String beanName : BeanFactoryUtils.beanNamesIncludingAncestors(context))
> {
> with 
> for (final String candidate : BeanFactoryUtils.beanNamesIncludingAncestors(context))
> {
>     final String beanName = (candidate.startsWith("&", candidate.subString(1), candidate);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org