camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-4538) Make CamelTestSupport return Registry instead of JndiRegistry in createRegistry method
Date Thu, 16 Feb 2012 05:46:59 GMT

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

Claus Ibsen commented on CAMEL-4538:
------------------------------------

Agree with Hadrian, this ticket should *not* introduce new APIs in camel-core. Its a pure
change in camel-test.

And yes createRegistry should just return a Registry interface. Then people can override the
createRegistry method and return their impl of choice. In fact we should consider using SimpleRegistry
as the default now instead of JndiRegistry.

And we could have some helper methods on CamelTestSupport to add a bean to the registry. Then
the impl can check if the registry is a SimpleRegistry, JndiRegistry and cast to the type,
and use the put/bind methods. And for other registry types such as the Spring AppCtx, then
it can throw an exception saying this is not supported.
                
> Make CamelTestSupport return Registry instead of JndiRegistry in createRegistry method
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4538
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4538
>             Project: Camel
>          Issue Type: Improvement
>          Components: tests
>    Affects Versions: 2.8.0
>            Reporter: Maciej Prochniak
>            Priority: Minor
>             Fix For: 2.10.0
>
>         Attachments: CAMEL-4538, CAMEL-4538-v2, unnamed.diff
>
>
> Usually when we write camel unit tests we want to use SimpleRegistry, not JndiRegistry

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message