0


I'm having a problem set timeout to invoke a webservices from a EJB Client. Using Weblogic as container.

[edit]
Web Services isn't in the same server, if I setup a JTA timeout its rolling back jta transaction without exception without cancel the previous call.
This process starts from a MDB, when JTA expires it consumes the JMS again and again and again and each web services invoking keep alive in WS Sever.
[/edit]

That was my steps:

  1. Created stubs with wsimport
  2. Created a proxy class to invoke webservice
  3. Called webservice from a EJB.

Timeout settings:

    // Setting timeout
    BindingProvider bindingProvider = (BindingProvider) getService();
    Map<String, Object> context = bindingProvider.getRequestContext();
    context.put(JAXWSProperties.CONNECT_TIMEOUT, 5000);
    context.put(JAXWSProperties.REQUEST_TIMEOUT, 20000);

If I invoke method from a stand alone program (like Swing, o a simple main) it works and throws a SocketTimeoutException, but from EJB don't respect the timeout.

Also tried to set a annotation to EJB method, but not worked either.

    @AccessTimeout(value=2000)

Any idea how to setup timeout calling from a Weblogic EJB?

Rodrigo Tavares
  • 369
  • 3
  • 14
  • try the instructions shown in the following post: http://stackoverflow.com/questions/1307154/weblogic-transaction-timeout-how-to-set-in-admin-console-in-weblogic-as-8-1 – Oldskultxo Jan 15 '16 at 09:44
  • @Oldskultxo Thank you for answer, but the webservices isn't in the same server, if I setup a JTA timeout it will rollback jta transaction without exception and not will cancel the previous call, this process starts from a MDB, when JTA expires it consumes the JMS again and again and again and each web services invoking keep alive in WS sever . Any way thx – Rodrigo Tavares Jan 15 '16 at 11:41

0 Answers0