How do I set the jax-ws client request timeout programatically on jboss?

Posted by Jonas Andersson on Stack Overflow See other posts from Stack Overflow or by Jonas Andersson
Published on 2010-04-07T12:17:32Z Indexed on 2010/04/07 12:33 UTC
Read the original article Hit count: 512

Filed under:
|
|
|

I am trying to set the request (and connection) timeout for a jax-ws-webservice-client generated with the jaxws-maven-plugin. When running my app under tomcat or jetty the timeout works, but when deployed under jboss it doesn't "take".

private void setRequestAndConnectionTimeout(Object wsPort) {
  String REQUEST_TIMEOUT = BindingProviderProperties.REQUEST_TIMEOUT; // "com.sun.xml.ws.request.timeout";
  ((BindingProvider) wsPort).getRequestContext().put(REQUEST_TIMEOUT, timeoutInMillisecs);
  ((BindingProvider) wsPort).getRequestContext().put(JAXWSProperties.CONNECT_TIMEOUT, timeoutInMillisecs);
}

What is the correct way to do this for JBoss?

© Stack Overflow or respective owner

Related posts about java

Related posts about jboss