HttpServletRequest.getServerName() occasionally returning null in concurrent use?

Posted by oconnor0 on Stack Overflow See other posts from Stack Overflow or by oconnor0
Published on 2010-03-11T16:43:22Z Indexed on 2010/03/11 18:04 UTC
Read the original article Hit count: 340

Under JBoss 4.0.1SP1, I have a servlet that makes multiple, concurrent calls to web services that are running under the same instance. I'm using request.getServerName() (on HttpServletRequest) to construct the endpoint URL. This normally works fine, but every once in a while returns null.

I hadn't seen this before running the web service requests in parallel, and so I guessed that sharing the HttpServletRequest among threads won't always work or something.

Any ideas on fixing this?

© Stack Overflow or respective owner

Related posts about java

Related posts about jboss