THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
<marshal> <jaxb id="jaxb" schema="classpath:person.xsd,classpath:address.xsd"/> </marshal> |
Camel will create and pool the underling SchemaFactory
instances on the fly, because the SchemaFactory
shipped with the JDK is not thread safe.
However, if you have a SchemaFactory
implementation which is thread safe, you can configure the JAXB data format to use this one:
Code Block | ||||
---|---|---|---|---|
| ||||
JaxbDataFormat jaxbDataFormat = new JaxbDataFormat();
jaxbDataFormat.setSchemaFactory(thradSafeSchemaFactory);
|
Dependencies
To use JAXB in your camel routes you need to add the a dependency on camel-jaxb which implements this data format.
...