return delegate;
}
protected DefaultTypeConverter createRegistry() {
// base the osgi type converter on the default type converter
DefaultTypeConverter answer = new DefaultTypeConverter(new DefaultPackageScanClassResolver() {
@Override
public Set<ClassLoader> getClassLoaders() {
// we don't need any classloaders as we use osgi service tracker instead
return Collections.emptySet();
}
}, injector, factoryFinder);
try {
// only load the core type converters, as osgi activator will keep track on bundles
// being installed/uninstalled and load type converters as part of that process
answer.loadCoreTypeConverters();
} catch (Exception e) {
throw new RuntimeCamelException("Error loading CoreTypeConverter due: " + e.getMessage(), e);
}
// Load the type converters the tracker has been tracking