You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jc <jo...@gmail.com> on 2006/02/16 14:07:38 UTC

thread safety in HttpInvoker

Hello,

I've created a subclass of HttpInvoker that that I can use to dynamically
invoke multiple web services on a remote server. I've done this so that I
can transparently introduce servicemix between 2 systems that today are
integrated via web services. The setup looks like this:

.net web front end -> soap -> SM -> same soap -> app server

This is a synchronous flow.

My consern is that since there will be multiple concurrent requests coming
in from the front end, it's rather important that requests are not
'confused' while they are being marshaled in and out of SM, in particular
the HttpInvoker.

I've already had to disable state in commons httpclient as it was caching
things like cookies that are sent by the application server, now they are
just passed through as regular headers. But i'm wondering since I haven't
seen anything really specific about threading in SM/JBI, is this a safe use
case? I could always create a new instance of HttpClient each time the
transform() method in HttpInvoker is called but i'm unsure if that would
just kill my performance.

Any suggestions?

Regards,
John