I was wondering if it was possible to disable socket connection pooling in JAX-WS?
I am making calls to a webservice from within Jetty. The webservice is designed to have at most two connections to the server at any given time. One of the connections is a blocking connection that's used to do a pub/sub poll with the server. The other connection is used to make standard SOAP requests. Once a connection polls, no other connections can be used to poll, or the server returns an error.
To do this, I create two SOAP ports, one of which I use to poll and the other to make requests. This works great until the poller returns some data and the SOAP request connection is sitting there idle. When that happens, the next time I try to poll with the same SOAP port, it picks one of the connections out of the connection pool and reuses it. If it happens to get the SOAP request connection, the server returns an error. From that point on, the poller's dead in the water, since any new SOAP ports I create end up reusing one of those two connections, both of which have been deemed invalid for polling.
A possible solution would be to disable connection pooling, which means that each time I create a new SOAP port, it would establish a new connection. Either that, or a way to get at the socket itself, which I could forcefully close.
It might also be worth mentioning that the connection to the server is a mutually authenticated SSL connection.
FYI, here's the spec for the server that I'm trying to connect to:
Any help would be appreciated! Thanks, Marshall