camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Svab (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6057) Camel Spring registry does not look into parent contexts
Date Sat, 09 Feb 2013 16:29:13 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-6057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13575198#comment-13575198
] 

Michal Svab commented on CAMEL-6057:
------------------------------------

When you have multiple Spring DispatcherServlets within a single webapp and each of these
servlets have their own app contexts, you might want to share beans between them. So you add
a another context with these shared beans, which is the parent of each of the servlet contexts.
                
> Camel Spring registry does not look into parent contexts
> --------------------------------------------------------
>
>                 Key: CAMEL-6057
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6057
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>    Affects Versions: 2.10.3
>            Reporter: Vitalii Tymchyshyn
>            Priority: Minor
>             Fix For: Future
>
>
> trunk components/camel-spring/src/main/java/org/apache/camel/spring/spi/ApplicationContextRegistry.java
> has next method:
>    @Override
>     public <T> Map<String, T> findByTypeWithName(Class<T> type) {
>         return applicationContext.getBeansOfType(type);
>     }
> but this method does not look into application context parent contexts.
> org.springframework.beans.factory.BeanFactoryUtils#beansOfTypeIncludingAncestors should
be used instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message