[
https://issues.apache.org/jira/browse/SMXCOMP-867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Freeman Fang updated SMXCOMP-867:
---------------------------------
Fix Version/s: 2011.02
> servicemix-camel performance optimizations
> ------------------------------------------
>
> Key: SMXCOMP-867
> URL: https://issues.apache.org/jira/browse/SMXCOMP-867
> Project: ServiceMix Components
> Issue Type: Improvement
> Components: servicemix-camel
> Environment:
> http://svn.apache.org/repos/asf/servicemix/components/trunk/engines/servicemix-camel
> Reporter: Jonathan Anstey
> Assignee: Freeman Fang
> Priority: Minor
> Fix For: 2011.02
>
> Attachments: jbibinding_perf_changes.patch
>
>
> I'm attaching a few small performance optimizations to the JbiBinding in the
> servicemix-camel component. Nothing Earth shattering here, but there were a
> few cases where we were doing the same operation twice in a method when only
> one was required. For example, one particulary bad offender was converting a
> Camel Message body to a Source object twice:
> {code}
> public void copyFromCamelToJbi(Message message, NormalizedMessage
> normalizedMessage) throws MessagingException {
> if (message != null && message.getBody() != null) {
> if (message.getBody(Source.class) == null) {
> logger.warn("Unable to convert message body of type {} into
> an XML Source", message.getBody().getClass());
> } else {
> normalizedMessage.setContent(message.getBody(Source.class));
> }
> }
> {code}
> Attaching a patch shortly...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira