Ensure that multiple threads can safely use the JBI endpoint Producer
---------------------------------------------------------------------

                 Key: SMXCOMP-751
                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-751
             Project: ServiceMix Components
          Issue Type: Bug
          Components: servicemix-camel
    Affects Versions: servicemix-camel-2010.01
            Reporter: Gert Vanthienen
            Assignee: Gert Vanthienen
             Fix For: servicemix-camel-2010.02


Currently, a single instance of a JbiProducer is used by the JbiEndpoint.  As 
soon as the producer is stopped, all references to the Producer become 
unusable.  Especially with custom code that accesses the Producer from multiple 
threads, this can easily lead to exceptions like the one below:

{noformat}
java.lang.NullPointerException
  at 
org.apache.servicemix.camel.JbiBinding.createJbiMessageExchange(JbiBinding.java:148)
  at 
org.apache.servicemix.camel.JbiBinding.makeJbiMessageExchange(JbiBinding.java:118)
  at 
org.apache.servicemix.camel.CamelConsumerEndpoint.process(CamelConsumerEndpoint.java:57)
 
  at 
org.apache.servicemix.camel.JbiEndpoint$JbiProducer$1.call(JbiEndpoint.java:122)
 
  at 
org.apache.servicemix.camel.JbiBinding.runWithCamelContextClassLoader(JbiBinding.java:107)
  at 
org.apache.servicemix.camel.JbiEndpoint$JbiProducer.process(JbiEndpoint.java:120)
{noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to