I'm concerned that my CXF client code might have poor performance due to the 
way I have it structured.

Each time my client code calls the service, I do this:

MyService service = new MyService();
MyPort port = service.getMyPort();
Client client = ClientProxy.getClient(port);
client.getRequestContext().put(Message.ENDPOINT_ADDRESS, theServiceAddress);
MyResponse myResponse = port.myOperation(myRequestObject).

My feeling is that it would be better in theory to create all of my port 
objects once and then reuse them on each service call. However, I've read that 
the service and port objects aren't thread safe. I also see documentation to 
the effect that they are "mostly" thread safe.

I would be very, very appreciative for any advice that anyone might have.

Regards,

Chuck Irvine
DST - Brokerage



Please consider the environment before printing this email and any attachments.

This e-mail and any attachments are intended only for the individual or company 
to which it is addressed and may contain information which is privileged, 
confidential and prohibited from disclosure or unauthorized use under 
applicable law. If you are not the intended recipient of this e-mail, you are 
hereby notified that any use, dissemination, or copying of this e-mail or the 
information contained in this e-mail is strictly prohibited by the sender. If 
you have received this transmission in error, please return the material 
received to the sender and delete all copies from your system.

Reply via email to