I have a Glassfish app server hosting my web service (jax-rs with apache cxf).
I have a Java client consuming this web service using code:
Service service = JAXRSClientFactory.create("http://localhost/service", Service.class);
The service is consumed x
number of times at run time. x
can vary.
All is good - the code runs fine and as expected.
The problem is that the server returns a http 500 after glassfish's max connections number is reached (under http service - keep alive). It then waits for the number of time out seconds specified before continuing. This repeats until app finishes.
Any ideas on how I can force the connection to close therefore the max connections limit will never be reached?
Much appreciated.