[ 
https://issues.apache.org/jira/browse/CAMEL-3776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244398#comment-13244398
 ] 

Christian Müller commented on CAMEL-3776:
-----------------------------------------

Hello Frank!

If we agree about the solution, I will back port it of course to the maintained 
camel-2.9.x and camel-2.8.x branch.
I highly interested which of the both solutions works better (faster) for you. 
If it's the pooled solution, I don't have anything against to this solution. I 
always try to start with the simplest solution which full fill the 
requirements... ;-)
I also try to get a better understanding what Dan suggested. But at present, I 
only got some NullPointerExceptions from JAXB when I converted the InputStream 
into a XMLStreamReader and pass this to the Unmarshaller... :-( Keep you 
posted...

I see the issue with the FallbackTypeConverter. I will fix this also. But my 
recommendation is to use the JAXBDataFormat explicitly. Imagine you have a 
route where you use the FallbackTypeConverter 10 times for the same 
JAXBContext. All this 10 routes will use the same Unmarshaller which will be 
less per formant (more locking), than to explicitly use 10 different 
JAXBDataFormat instances (of course with the same JAXBContext). This will 
require less locking because the Unmarshaller is shared per JAXBDataFormat and 
not per JAXBContext. Make sense for you?

I we go for the pooled solution (if it's faster), we should use/register the 
pool capabilities Camel provides. At present, I'm not familiar enough with this 
to suggest a solution. Will wait for the performance results of your tests and 
if I'm able to get the XMLStreamReader stuff working...

Best,
Christian
                
> Add pooling support for JAXB data format
> ----------------------------------------
>
>                 Key: CAMEL-3776
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3776
>             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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to