[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Configuring a CFXEndPoint with multiple certificates

That solution is actually not very efficient as the Producer will continually be created if the RecipientList endpoints are constantly changing which is likely for my case. The problem is that the cache is keyed on the URI but for my use case this is not enough. I really need the ability to set the ProducerCache key programmatically much as I can when I add the Endpoint to the CamelContext.

Extending the CXFEndPoint and overriding getEndpointUri would not work as the Uri is always the same and adding extra characters to the returned result would break the actual communication.

Really I need something like:

 protected synchronized Producer doGetProducer(Endpoint endpoint, boolean pooled) {
        String key = endpoint.getProducerCacheKey(); // new method on Endpoint or Service interface
        Producer answer = producers.get(key);

I could then implement / override the getProducerCacheKey() myself.

Boots UK Limited, Registered 928555, Nottingham NG2 3AA This e-mail (including any attachments) is confidential. It may be read, copied and used only by the intended recipient. If you are not the intended recipient you should not copy it or use it for any purpose or disclose its contents to any other person. If you have received this message in error, please notify us and remove it from your system. We cannot accept liability for any damage you incur as a result of virus infection.