@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 wrong…
@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.