camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bilgin Ibryam (Commented) (JIRA)" <>
Subject [jira] [Commented] (CAMEL-4538) Make CamelTestSupport return Registry instead of JndiRegistry in createRegistry method
Date Sat, 25 Feb 2012 23:25:48 GMT


Bilgin Ibryam commented on CAMEL-4538:

@Hadrian I introduced SimpleContext because noticed that each registry has a context: 
JndiRegistry - JndiContext, ApplicationContextRegistry - ApplicationContext, OsgiServiceRegistry
- BundleContext… 
All that made me think that each registry is a kind of read only access interface (only lookup
methods, without any bind methods) to the specific context. 
Adding some add/remove methods to the Registry would simplify this task, but I think that
is a major change for the Registry interface. And yes, the location for SimpleContext was

@Claus I didn't want to do any API changes in Registry that's why introduced SimpleContext,
which is also API change by introducing a new class :)

Anyway, all this is past, because after your comments I updated the patch, and there are no
api changes any more.

The patch does the following:

1. createRegistry() return a Registry, with SimpleRegistry implementation by default.
2. Tests override this method to add beans to SimpleRegistry. That is possible because SimpleRegistry
is also a Map.

> Make CamelTestSupport return Registry instead of JndiRegistry in createRegistry method
> --------------------------------------------------------------------------------------
>                 Key: CAMEL-4538
>                 URL:
>             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, register_last.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:!default.jspa
For more information on JIRA, see:


View raw message