...
The default implementation, DefaultTypeConverter now throws a NoTypeConversionAvailableException if a suitable conversion cannot be found (CAMEL-84). The semantical ambiguity of null (both valid result and indication of no conversion found) is now resolved, but this may impact existing code in that it should now catch the exception instead of checking for null.
TypeConverterRegistry
New in Camel 2.0
Exposed the TypeConverterRegistry from CamelContext so end users more easily will be able to add type converters at runtime. This is also usable in situations where the default discovering of type converters fails, on platforms with classloading issues.
To access the registry you get it from the CamelContext
Code Block | ||||
---|---|---|---|---|
| ||||
CamelContext context = ...
context.getTypeConverterRegistry()
|
Add type converter at runtime
The following sample demonstrates how to add a type converter at runtime:
TODO: code snippets
Discovering Type Converters
...