if (!engine.getContinuationsEnabled()) {
return null;
}
Continuation cont = ContinuationSupport.getContinuation(req, null);
synchronized (cont) {
Object o = cont.getObject();
if (o instanceof ContinuationInfo) {
ContinuationInfo ci = (ContinuationInfo)o;
m = (MessageImpl)ci.getMessage();
// now that we got the message we don't need ContinuationInfo
// as we don't know how continuation was suspended, by jetty wrapper
// or directly in which (latter) case we need to ensure that an original user object
// if any, need to be restored
cont.setObject(ci.getUserObject());
}
if (m == null && (cont.isPending() || cont.isResumed())) {
String message = "No message for existing continuation, status : "
+ (cont.isPending() ? "Pending" : "Resumed");
if (!(o instanceof ContinuationInfo)) {
message += ", ContinuationInfo object is unavailable";
}
LOG.warning(message);
}