camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller (Commented) (JIRA) <>
Subject [jira] [Commented] (CAMEL-3776) Add pooling support for JAXB data format
Date Sun, 01 Apr 2012 10:14:31 GMT


Christian Müller commented on CAMEL-3776:

Frank, I tried whether Camel can deal with the XMLStreamReader conversion out of the box (without
your patch). So, there is nothing wrong with it.
I made a couple of stress tests. I unmarshaled the XML
<purchaseOrder name='Wine' amount='123.45' price='2.22'/>
10000 times with 
ExecutorService pool = Executors.newFixedThreadPool(20);
long start = System.currentTimeMillis();
for (int i = 0; i < counter; i++) {
    pool.execute(new Runnable() {
        public void run() {
The numbers I got for different scenarios are:
- with the current implementation it took 6440ms
- with using a GenericObjectPool from commons-pool (maxActive = 20) it took 3323ms
- with using a ReentrantLock in JaxbDataFormat.unmarshal() for the lines where the Unmarshaller
is used, it took 2813ms

I didn't had the time to look what's necessary to get the convertBodyTo(XMLStreamReader.class)
working an what the performance is.

May be the ReentrantLock is a smart solution without the "complexity" of pooling objects?
> Add pooling support for JAXB data format
> ----------------------------------------
>                 Key: CAMEL-3776
>                 URL:
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-jaxb
>            Reporter: Claus Ibsen
>             Fix For: 3.0.0
>         Attachments: jaxb-pool.patch
> We should use the ServicePool in camel-core to pool JAXB / marshaller / unmarshaller.
> Of course ppl should be able to customize pool settings and if to be used.
> Also mind that for type converters with JAXB you do not configure a JAXB data format.
And thus we should
> still be able to configure and use pooling, so the type converter can be more efficient.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message