Hello, 

When we send messages to JBI endpoints in camel using following code:

ProducerTemplate<Exchange> pt =
contextProvider.getContext().createProducerTemplate();
            exchange = pt.send("jbi:service:.....", exchange);

a new JBI endpoint is registered in SMX each time new ProducerTemplate
is created (I'm using servicemix-camel 2008.01 with smx 3.3) . 


Each time new DefaultProducerTemplate is created, it creates new empty
ProducerCache. Adding endpoint to the cache includes following code:
 Producer answer = endpoint.createProducer();
 answer.start();

Now, JbiEndpoint implementation in SMX-camel returns same object of
class JbiProducer in createProducer method - it's cached in JbiEndpoint
class. However, each time start() is called on JbiProducer class a new
endpoint is registered is SMX.

I guess it should be considered a bug in SMX-camel, which can be 
fixed by keeping JBI endpoint cached in JbiProducer class and
registering it only when necessary

regards, 
m. prochniak

Reply via email to