Migrating Routes from JavaBean to XML
Since 7.0, the Java classes and Jars support has been deprecated in Talend Data Mapper (TDM). If you have existing routes based on the JavaBean Representation, you need to migrate those to the XML Representation.
Current Java Support
The current support for Java is based on Xstream. For more information, refer to http://x-stream.github.io/.
On Input, the caller passes a JavaBean
in a
JavaObjectSource
. The TDM Reader internally collects the JavaBean using
XStream and generates SAX Events to be processed by the map's xQuery
.
On Output, the TDM Java Writer also uses XStream and drops the SAX Events received from the
map in a JavaBean
placed in a JavaObjectResult
.
Note: You can only use the current Java support in a Route, since tHMap does not support
JavaObjectSource
or JavaObjectResult
. Performing JavaBean to XML Serialization
To migrate your existing routes to the XML Representation in Talend Data Mapper, you need to use
XStream.
Before you begin
You start with the following route:
After migration, the route looks as such:
where cProcessor1p and cProcessor2p are additional camel
processors.