cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject SuspendedInvocationException is lost during continuation.suspend()
Date Mon, 22 Nov 2010 17:56:56 GMT
Hi

I've found out, while working with CXF Continuations API recently is that

continuation.suspend()

is returning normally and no SuspendedInvocationException is thrown.

This is unexpected in that now, when continuation.suspend() is used directly
in the application code, the explicit 'return' has to be added.
This is not too bad when it is done immediately in the top-level service
object but if it happens in one of the sub-routines we are effectively have
no way of
knowing at the start of the call if it was suspended or not, unless we use
check the status explicitly :

Ex :

public void soapMethod() {
   doIt();

   if (!continuation.isPending()) {
       dontDoItIfSuspended();
   }
}

private void doIt() {
    continuation.suspend();
}

Willem - is it how the explicit continuations code has to be written now ?

thanks, Sergey

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message