2 Replies Latest reply: Mar 14, 2010 12:59 AM by 807574 RSS

    Proper timeout inside of a Composite Application

    807574
      Howdy,

      We have the basic scenario where we have one service (A) talking to another service (B) and under certain circumstances service (B) can take a very long time to return. And we want service (A) to throw an exception in a time out situation. In the past (Pre-JCAPs) we have done something like...

      ((BindingProvider)port).getRequestContext().put("com.sun.xml.ws.request.timeout", SOMEVALUE);
      ((BindingProvider)port).getRequestContext().put("com.sun.xml.ws.connect.timeout", SOMEVALUE);

      Which, if we deploy without the wrapping of a composite application, the proper read timeout exception is returned from our calling code, but when that proxy returns a "SystemException: org.omg.CORBA.INVALID_TRANSACTION: vmcid: 0x0 minor code: 2 completed: no". If we then turn off transactions (@TransactionAttribute(value=TransactionAttributeType.NOT_SUPPORTED) all is happy. This all seems like a very bad idea. So we moved on to trying it inside of a CA.

      However, If we deploy (with transactions) in a Composite Application, the service call never times out ignoring the properties that are set and our goal is never accomplished.

      So my question is pretty basic. In the JCAPs world, how should we do service timeouts? (Time-outs need to vary on a service by service basis so a JVM/Appserver wide setting is out of the question)

      (We're using JCAPs 2.0)

      Thanks!!