Re: CXF Continuations Not Portable Issue

2012-11-27 Thread Richard Opalka
Hi Sergey,

On 11/26/2012 04:58 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 15:05, Richard Opalka wrote:
 Hi Sergey,

 On 11/26/2012 02:57 PM, Richard Opalka wrote:
 Hi Sergey,

 On 11/26/2012 01:31 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 12:29, Richard Opalka wrote:
 Hi Sergey,


 On 11/26/2012 01:21 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 12:15, Richard Opalka wrote:
 Dear CXF developers,

   I'm analyzing our recent CXF continuation related failures
 in CI
 and I identified the following problem:

 SVN commit id: 1409193

 introduced

 ---
 @@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider
 implements
 ContinuationProvider {

 if (continuation == null) {
 continuation = new Servlet3Continuation();
 +} else {
 +continuation.startAsyncAgain();
 }
 return continuation;
 }
 ---

 method call that causes our JBossWeb to throw IllegalStateException.
 According to startAsync() javadoc for Throws:

 http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29




 ---
 Throws:
IllegalStateException - if this request is within the
 scope of a
 filter or servlet that does not support asynchronous operations
 (that
 is, isAsyncSupported() returns false), or if this method is called
 again
 without any asynchronous dispatch (resulting from one of the
 AsyncContext#dispatch methods), is called outside the scope of
 any such
 dispatch, or is called again within the scope of the same
 dispatch, or
 if the response has already been closed
 ---

 JBossWeb is strictly following these ISE guidelines (is not lenient
 like e.g. Jakarta Tomcat).

 What would you say about
 Subsequent invocations of this method, or its overloaded variant,
 will
 return the same AsyncContext instance, reinitialized as
 appropriate.  ?

 Without this call I can not have the test doing multiple timeouts
 on the
 same continuation working...

 Makes sense to me. I had a look to our JBoss Web code again and I
 noticed one suspicious line there - I'm going to discuss it with our
 folks.


 Oh, thanks for that, I've just sent one more follow-up, sorry about 
 the
 noise, should've waited :-)

 Let's see what our Servlet experts will say -
 https://issues.jboss.org/browse/JBWEB-256

 Our JBoss Web guru is saying JBoss Web impl. is correct.

 I'd appreciate to see more concrete clarifications, regarding the
 following two points:
 
 - the documentation clearly says that repeated calls of startAsync()
 return the same instance.
 - what does it mean to have called startAsync() called on the same
 dispatch, does it apply to a current thread dispatch or to the whole
 suspended continuation process ?
 
 To be honest, the positive statement on the multiple startAsync calls
 makes me think the ISE case applies to this method called multiple times
 during the same thread dispatch...
 
 Thanks, Sergey

Unfortunately I'm not servlet expert :( But Remy suggested (see
JBWEB-256 comments):

'Feel free to seek further clarification from the specification expert
groups if you like.'

Cheers,

Rio

 


 Cheers, Sergey



 The last issue that I identified with
 Servlet3ContinuationProvider is
 the isNew flag has incorrect initial value - it should be *true*.
 Sure - needs to be fixed

 Thanks


 Thanks, Sergey


 Cheers,

 Rio










 
 


-- 
Richard Opalka
Principal Software Engineer
JBoss, by Red Hat
Cell: +420 731 186 942


Re: CXF Continuations Not Portable Issue

2012-11-27 Thread Sergey Beryozkin

Hi Richard
On 27/11/12 08:12, Richard Opalka wrote:

Hi Sergey,

On 11/26/2012 04:58 PM, Sergey Beryozkin wrote:

Hi Richard
On 26/11/12 15:05, Richard Opalka wrote:

Hi Sergey,

On 11/26/2012 02:57 PM, Richard Opalka wrote:

Hi Sergey,

On 11/26/2012 01:31 PM, Sergey Beryozkin wrote:

Hi Richard
On 26/11/12 12:29, Richard Opalka wrote:

Hi Sergey,


On 11/26/2012 01:21 PM, Sergey Beryozkin wrote:

Hi Richard
On 26/11/12 12:15, Richard Opalka wrote:

Dear CXF developers,

   I'm analyzing our recent CXF continuation related failures
in CI
and I identified the following problem:

SVN commit id: 1409193

introduced

---
@@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider
implements
ContinuationProvider {

 if (continuation == null) {
 continuation = new Servlet3Continuation();
+} else {
+continuation.startAsyncAgain();
 }
 return continuation;
 }
---

method call that causes our JBossWeb to throw IllegalStateException.
According to startAsync() javadoc for Throws:

http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29




---
Throws:
IllegalStateException - if this request is within the
scope of a
filter or servlet that does not support asynchronous operations
(that
is, isAsyncSupported() returns false), or if this method is called
again
without any asynchronous dispatch (resulting from one of the
AsyncContext#dispatch methods), is called outside the scope of
any such
dispatch, or is called again within the scope of the same
dispatch, or
if the response has already been closed
---

JBossWeb is strictly following these ISE guidelines (is not lenient
like e.g. Jakarta Tomcat).


What would you say about
Subsequent invocations of this method, or its overloaded variant,
will
return the same AsyncContext instance, reinitialized as
appropriate.  ?

Without this call I can not have the test doing multiple timeouts
on the
same continuation working...


Makes sense to me. I had a look to our JBoss Web code again and I
noticed one suspicious line there - I'm going to discuss it with our
folks.



Oh, thanks for that, I've just sent one more follow-up, sorry about
the
noise, should've waited :-)


Let's see what our Servlet experts will say -
https://issues.jboss.org/browse/JBWEB-256


Our JBoss Web guru is saying JBoss Web impl. is correct.


I'd appreciate to see more concrete clarifications, regarding the
following two points:

- the documentation clearly says that repeated calls of startAsync()
return the same instance.
- what does it mean to have called startAsync() called on the same
dispatch, does it apply to a current thread dispatch or to the whole
suspended continuation process ?

To be honest, the positive statement on the multiple startAsync calls
makes me think the ISE case applies to this method called multiple times
during the same thread dispatch...

Thanks, Sergey


Unfortunately I'm not servlet expert :( But Remy suggested (see
JBWEB-256 comments):

'Feel free to seek further clarification from the specification expert
groups if you like.'


First of all, thanks for validating the proposed fix from Dan, your 
patch has been applied.


I think at the moment the only argument I have is it works with Tomcat 
 Jetty which is not a strong enough proof that ISE should not be 
actually reported :-), so the fix is a good compromise. I'd love to see 
the clear statement from the servlet experts, but I wonder if it is even 
possible to get them to answer :-)


Thanks, Sergey



Cheers,

Rio







Cheers, Sergey





The last issue that I identified with
Servlet3ContinuationProvider is
the isNew flag has incorrect initial value - it should be *true*.

Sure - needs to be fixed


CXF Continuations Not Portable Issue

2012-11-26 Thread Richard Opalka
Dear CXF developers,

   I'm analyzing our recent CXF continuation related failures in CI
and I identified the following problem:

SVN commit id: 1409193

introduced

---
@@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider implements
ContinuationProvider {

 if (continuation == null) {
 continuation = new Servlet3Continuation();
+} else {
+continuation.startAsyncAgain();
 }
 return continuation;
 }
---

method call that causes our JBossWeb to throw IllegalStateException.
According to startAsync() javadoc for Throws:

http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29

---
Throws:
IllegalStateException - if this request is within the scope of a
filter or servlet that does not support asynchronous operations (that
is, isAsyncSupported() returns false), or if this method is called again
without any asynchronous dispatch (resulting from one of the
AsyncContext#dispatch methods), is called outside the scope of any such
dispatch, or is called again within the scope of the same dispatch, or
if the response has already been closed
---

JBossWeb is strictly following these ISE guidelines (is not lenient
like e.g. Jakarta Tomcat).

The last issue that I identified with Servlet3ContinuationProvider is
the isNew flag has incorrect initial value - it should be *true*.

Cheers,

Rio

-- 
Richard Opalka
Principal Software Engineer
JBoss, by Red Hat
Cell: +420 731 186 942


Re: CXF Continuations Not Portable Issue

2012-11-26 Thread Sergey Beryozkin

Hi Richard
On 26/11/12 12:15, Richard Opalka wrote:

Dear CXF developers,

I'm analyzing our recent CXF continuation related failures in CI
and I identified the following problem:

SVN commit id: 1409193

introduced

---
@@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider implements
ContinuationProvider {

  if (continuation == null) {
  continuation = new Servlet3Continuation();
+} else {
+continuation.startAsyncAgain();
  }
  return continuation;
  }
---

method call that causes our JBossWeb to throw IllegalStateException.
According to startAsync() javadoc for Throws:

http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29

---
Throws:
 IllegalStateException - if this request is within the scope of a
filter or servlet that does not support asynchronous operations (that
is, isAsyncSupported() returns false), or if this method is called again
without any asynchronous dispatch (resulting from one of the
AsyncContext#dispatch methods), is called outside the scope of any such
dispatch, or is called again within the scope of the same dispatch, or
if the response has already been closed
---

JBossWeb is strictly following these ISE guidelines (is not lenient
like e.g. Jakarta Tomcat).


What would you say about
Subsequent invocations of this method, or its overloaded variant, will 
return the same AsyncContext instance, reinitialized as appropriate.  ?


Without this call I can not have the test doing multiple timeouts on the 
same continuation working...




The last issue that I identified with Servlet3ContinuationProvider is
the isNew flag has incorrect initial value - it should be *true*.

Sure - needs to be fixed

Thanks, Sergey



Cheers,

Rio





Re: CXF Continuations Not Portable Issue

2012-11-26 Thread Richard Opalka
Hi Sergey,


On 11/26/2012 01:21 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 12:15, Richard Opalka wrote:
 Dear CXF developers,

 I'm analyzing our recent CXF continuation related failures in CI
 and I identified the following problem:

 SVN commit id: 1409193

 introduced

 ---
 @@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider implements
 ContinuationProvider {

   if (continuation == null) {
   continuation = new Servlet3Continuation();
 +} else {
 +continuation.startAsyncAgain();
   }
   return continuation;
   }
 ---

 method call that causes our JBossWeb to throw IllegalStateException.
 According to startAsync() javadoc for Throws:

 http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29


 ---
 Throws:
  IllegalStateException - if this request is within the scope of a
 filter or servlet that does not support asynchronous operations (that
 is, isAsyncSupported() returns false), or if this method is called again
 without any asynchronous dispatch (resulting from one of the
 AsyncContext#dispatch methods), is called outside the scope of any such
 dispatch, or is called again within the scope of the same dispatch, or
 if the response has already been closed
 ---

 JBossWeb is strictly following these ISE guidelines (is not lenient
 like e.g. Jakarta Tomcat).
 
 What would you say about
 Subsequent invocations of this method, or its overloaded variant, will
 return the same AsyncContext instance, reinitialized as appropriate.  ?
 
 Without this call I can not have the test doing multiple timeouts on the
 same continuation working...

Makes sense to me. I had a look to our JBoss Web code again and I
noticed one suspicious line there - I'm going to discuss it with our folks.

 

 The last issue that I identified with Servlet3ContinuationProvider is
 the isNew flag has incorrect initial value - it should be *true*.
 Sure - needs to be fixed

Thanks

 
 Thanks, Sergey
 

 Cheers,

 Rio

 


-- 
Richard Opalka
Principal Software Engineer
JBoss, by Red Hat
Cell: +420 731 186 942


Re: CXF Continuations Not Portable Issue

2012-11-26 Thread Sergey Beryozkin

More comments below,

On 26/11/12 12:21, Sergey Beryozkin wrote:

Hi Richard
On 26/11/12 12:15, Richard Opalka wrote:

Dear CXF developers,

I'm analyzing our recent CXF continuation related failures in CI
and I identified the following problem:

SVN commit id: 1409193

introduced

---
@@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider implements
ContinuationProvider {

if (continuation == null) {
continuation = new Servlet3Continuation();
+ } else {
+ continuation.startAsyncAgain();
}
return continuation;
}
---

method call that causes our JBossWeb to throw IllegalStateException.
According to startAsync() javadoc for Throws:

http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29


---
Throws:
IllegalStateException - if this request is within the scope of a
filter or servlet that does not support asynchronous operations (that
is, isAsyncSupported() returns false), or if this method is called again
without any asynchronous dispatch (resulting from one of the
AsyncContext#dispatch methods), is called outside the scope of any such
dispatch, or is called again within the scope of the same dispatch, or
if the response has already been closed
---


I actually read is called again within the scope of the same dispatch 
differently, a continuation thread is dispatched one or many times, but 
if you get startAsync() called within a specific thread dispatch more 
than once then it is indeed an ISE.


I guess my reading may be wrong - but the fact that I get the tests 
working with Tomcat and Jetty might imply that may be JBossWeb might 
treat this case specifically ?




JBossWeb is strictly following these ISE guidelines (is not lenient
like e.g. Jakarta Tomcat).


CC-ing Bill too - the feedback is welcome

Finally, what continuation tests are actually failing, can you provide 
more info please


Cheers, Sergey



What would you say about
Subsequent invocations of this method, or its overloaded variant, will
return the same AsyncContext instance, reinitialized as appropriate.  ?

Without this call I can not have the test doing multiple timeouts on the
same continuation working...



The last issue that I identified with Servlet3ContinuationProvider is
the isNew flag has incorrect initial value - it should be *true*.

Sure - needs to be fixed

Thanks, Sergey



Cheers,

Rio







Re: CXF Continuations Not Portable Issue

2012-11-26 Thread Sergey Beryozkin

Hi Richard
On 26/11/12 12:29, Richard Opalka wrote:

Hi Sergey,


On 11/26/2012 01:21 PM, Sergey Beryozkin wrote:

Hi Richard
On 26/11/12 12:15, Richard Opalka wrote:

Dear CXF developers,

 I'm analyzing our recent CXF continuation related failures in CI
and I identified the following problem:

SVN commit id: 1409193

introduced

---
@@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider implements
ContinuationProvider {

   if (continuation == null) {
   continuation = new Servlet3Continuation();
+} else {
+continuation.startAsyncAgain();
   }
   return continuation;
   }
---

method call that causes our JBossWeb to throw IllegalStateException.
According to startAsync() javadoc for Throws:

http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29


---
Throws:
  IllegalStateException - if this request is within the scope of a
filter or servlet that does not support asynchronous operations (that
is, isAsyncSupported() returns false), or if this method is called again
without any asynchronous dispatch (resulting from one of the
AsyncContext#dispatch methods), is called outside the scope of any such
dispatch, or is called again within the scope of the same dispatch, or
if the response has already been closed
---

JBossWeb is strictly following these ISE guidelines (is not lenient
like e.g. Jakarta Tomcat).


What would you say about
Subsequent invocations of this method, or its overloaded variant, will
return the same AsyncContext instance, reinitialized as appropriate.  ?

Without this call I can not have the test doing multiple timeouts on the
same continuation working...


Makes sense to me. I had a look to our JBoss Web code again and I
noticed one suspicious line there - I'm going to discuss it with our folks.



Oh, thanks for that, I've just sent one more follow-up, sorry about  the 
noise, should've waited :-)


Cheers, Sergey





The last issue that I identified with Servlet3ContinuationProvider is
the isNew flag has incorrect initial value - it should be *true*.

Sure - needs to be fixed


Thanks



Thanks, Sergey



Cheers,

Rio











Re: CXF Continuations Not Portable Issue

2012-11-26 Thread Richard Opalka
Hi Sergey,

On 11/26/2012 01:31 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 12:29, Richard Opalka wrote:
 Hi Sergey,


 On 11/26/2012 01:21 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 12:15, Richard Opalka wrote:
 Dear CXF developers,

  I'm analyzing our recent CXF continuation related failures in CI
 and I identified the following problem:

 SVN commit id: 1409193

 introduced

 ---
 @@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider
 implements
 ContinuationProvider {

if (continuation == null) {
continuation = new Servlet3Continuation();
 +} else {
 +continuation.startAsyncAgain();
}
return continuation;
}
 ---

 method call that causes our JBossWeb to throw IllegalStateException.
 According to startAsync() javadoc for Throws:

 http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29



 ---
 Throws:
   IllegalStateException - if this request is within the scope of a
 filter or servlet that does not support asynchronous operations (that
 is, isAsyncSupported() returns false), or if this method is called
 again
 without any asynchronous dispatch (resulting from one of the
 AsyncContext#dispatch methods), is called outside the scope of any such
 dispatch, or is called again within the scope of the same dispatch, or
 if the response has already been closed
 ---

 JBossWeb is strictly following these ISE guidelines (is not lenient
 like e.g. Jakarta Tomcat).

 What would you say about
 Subsequent invocations of this method, or its overloaded variant, will
 return the same AsyncContext instance, reinitialized as appropriate.  ?

 Without this call I can not have the test doing multiple timeouts on the
 same continuation working...

 Makes sense to me. I had a look to our JBoss Web code again and I
 noticed one suspicious line there - I'm going to discuss it with our
 folks.

 
 Oh, thanks for that, I've just sent one more follow-up, sorry about  the
 noise, should've waited :-)

Let's see what our Servlet experts will say -
https://issues.jboss.org/browse/JBWEB-256

 
 Cheers, Sergey
 


 The last issue that I identified with Servlet3ContinuationProvider is
 the isNew flag has incorrect initial value - it should be *true*.
 Sure - needs to be fixed

 Thanks


 Thanks, Sergey


 Cheers,

 Rio




 
 


-- 
Richard Opalka
Principal Software Engineer
JBoss, by Red Hat
Cell: +420 731 186 942


Re: CXF Continuations Not Portable Issue

2012-11-26 Thread Richard Opalka
Hi Sergey,

On 11/26/2012 02:57 PM, Richard Opalka wrote:
 Hi Sergey,
 
 On 11/26/2012 01:31 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 12:29, Richard Opalka wrote:
 Hi Sergey,


 On 11/26/2012 01:21 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 12:15, Richard Opalka wrote:
 Dear CXF developers,

  I'm analyzing our recent CXF continuation related failures in CI
 and I identified the following problem:

 SVN commit id: 1409193

 introduced

 ---
 @@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider
 implements
 ContinuationProvider {

if (continuation == null) {
continuation = new Servlet3Continuation();
 +} else {
 +continuation.startAsyncAgain();
}
return continuation;
}
 ---

 method call that causes our JBossWeb to throw IllegalStateException.
 According to startAsync() javadoc for Throws:

 http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29



 ---
 Throws:
   IllegalStateException - if this request is within the scope of a
 filter or servlet that does not support asynchronous operations (that
 is, isAsyncSupported() returns false), or if this method is called
 again
 without any asynchronous dispatch (resulting from one of the
 AsyncContext#dispatch methods), is called outside the scope of any such
 dispatch, or is called again within the scope of the same dispatch, or
 if the response has already been closed
 ---

 JBossWeb is strictly following these ISE guidelines (is not lenient
 like e.g. Jakarta Tomcat).

 What would you say about
 Subsequent invocations of this method, or its overloaded variant, will
 return the same AsyncContext instance, reinitialized as appropriate.  ?

 Without this call I can not have the test doing multiple timeouts on the
 same continuation working...

 Makes sense to me. I had a look to our JBoss Web code again and I
 noticed one suspicious line there - I'm going to discuss it with our
 folks.


 Oh, thanks for that, I've just sent one more follow-up, sorry about  the
 noise, should've waited :-)
 
 Let's see what our Servlet experts will say -
 https://issues.jboss.org/browse/JBWEB-256

Our JBoss Web guru is saying JBoss Web impl. is correct.

 

 Cheers, Sergey



 The last issue that I identified with Servlet3ContinuationProvider is
 the isNew flag has incorrect initial value - it should be *true*.
 Sure - needs to be fixed

 Thanks


 Thanks, Sergey


 Cheers,

 Rio






 
 


-- 
Richard Opalka
Principal Software Engineer
JBoss, by Red Hat
Cell: +420 731 186 942


Re: CXF Continuations Not Portable Issue

2012-11-26 Thread Sergey Beryozkin

Hi Richard
On 26/11/12 15:05, Richard Opalka wrote:

Hi Sergey,

On 11/26/2012 02:57 PM, Richard Opalka wrote:

Hi Sergey,

On 11/26/2012 01:31 PM, Sergey Beryozkin wrote:

Hi Richard
On 26/11/12 12:29, Richard Opalka wrote:

Hi Sergey,


On 11/26/2012 01:21 PM, Sergey Beryozkin wrote:

Hi Richard
On 26/11/12 12:15, Richard Opalka wrote:

Dear CXF developers,

  I'm analyzing our recent CXF continuation related failures in CI
and I identified the following problem:

SVN commit id: 1409193

introduced

---
@@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider
implements
ContinuationProvider {

if (continuation == null) {
continuation = new Servlet3Continuation();
+} else {
+continuation.startAsyncAgain();
}
return continuation;
}
---

method call that causes our JBossWeb to throw IllegalStateException.
According to startAsync() javadoc for Throws:

http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29



---
Throws:
   IllegalStateException - if this request is within the scope of a
filter or servlet that does not support asynchronous operations (that
is, isAsyncSupported() returns false), or if this method is called
again
without any asynchronous dispatch (resulting from one of the
AsyncContext#dispatch methods), is called outside the scope of any such
dispatch, or is called again within the scope of the same dispatch, or
if the response has already been closed
---

JBossWeb is strictly following these ISE guidelines (is not lenient
like e.g. Jakarta Tomcat).


What would you say about
Subsequent invocations of this method, or its overloaded variant, will
return the same AsyncContext instance, reinitialized as appropriate.  ?

Without this call I can not have the test doing multiple timeouts on the
same continuation working...


Makes sense to me. I had a look to our JBoss Web code again and I
noticed one suspicious line there - I'm going to discuss it with our
folks.



Oh, thanks for that, I've just sent one more follow-up, sorry about  the
noise, should've waited :-)


Let's see what our Servlet experts will say -
https://issues.jboss.org/browse/JBWEB-256


Our JBoss Web guru is saying JBoss Web impl. is correct.

I'd appreciate to see more concrete clarifications, regarding the 
following two points:


- the documentation clearly says that repeated calls of startAsync() 
return the same instance.
- what does it mean to have called startAsync() called on the same 
dispatch, does it apply to a current thread dispatch or to the whole 
suspended continuation process ?


To be honest, the positive statement on the multiple startAsync calls 
makes me think the ISE case applies to this method called multiple times 
during the same thread dispatch...


Thanks, Sergey





Cheers, Sergey





The last issue that I identified with Servlet3ContinuationProvider is
the isNew flag has incorrect initial value - it should be *true*.

Sure - needs to be fixed


Thanks



Thanks, Sergey



Cheers,

Rio




















Re: CXF Continuations Not Portable Issue

2012-11-26 Thread Daniel Kulp

Any idea if something as simple as:


void startAsyncAgain() {
AsyncContext old = context;
try {
 context = req.startAsync();
} catch (IllegalStateException ex) { 
 context = old;
   }
   context.addListener(this);
}

or similar would allow it to work for both JBoss and the other engines?

Dan



On Nov 26, 2012, at 10:58 AM, Sergey Beryozkin sberyoz...@gmail.com wrote:

 Hi Richard
 On 26/11/12 15:05, Richard Opalka wrote:
 Hi Sergey,
 
 On 11/26/2012 02:57 PM, Richard Opalka wrote:
 Hi Sergey,
 
 On 11/26/2012 01:31 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 12:29, Richard Opalka wrote:
 Hi Sergey,
 
 
 On 11/26/2012 01:21 PM, Sergey Beryozkin wrote:
 Hi Richard
 On 26/11/12 12:15, Richard Opalka wrote:
 Dear CXF developers,
 
  I'm analyzing our recent CXF continuation related failures in CI
 and I identified the following problem:
 
 SVN commit id: 1409193
 
 introduced
 
 ---
 @@ -57,32 +57,30 @@ public class Servlet3ContinuationProvider
 implements
 ContinuationProvider {
 
if (continuation == null) {
continuation = new Servlet3Continuation();
 +} else {
 +continuation.startAsyncAgain();
}
return continuation;
}
 ---
 
 method call that causes our JBossWeb to throw IllegalStateException.
 According to startAsync() javadoc for Throws:
 
 http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#startAsync%28%29
 
 
 
 ---
 Throws:
   IllegalStateException - if this request is within the scope of a
 filter or servlet that does not support asynchronous operations (that
 is, isAsyncSupported() returns false), or if this method is called
 again
 without any asynchronous dispatch (resulting from one of the
 AsyncContext#dispatch methods), is called outside the scope of any such
 dispatch, or is called again within the scope of the same dispatch, or
 if the response has already been closed
 ---
 
 JBossWeb is strictly following these ISE guidelines (is not lenient
 like e.g. Jakarta Tomcat).
 
 What would you say about
 Subsequent invocations of this method, or its overloaded variant, will
 return the same AsyncContext instance, reinitialized as appropriate.  ?
 
 Without this call I can not have the test doing multiple timeouts on the
 same continuation working...
 
 Makes sense to me. I had a look to our JBoss Web code again and I
 noticed one suspicious line there - I'm going to discuss it with our
 folks.
 
 
 Oh, thanks for that, I've just sent one more follow-up, sorry about  the
 noise, should've waited :-)
 
 Let's see what our Servlet experts will say -
 https://issues.jboss.org/browse/JBWEB-256
 
 Our JBoss Web guru is saying JBoss Web impl. is correct.
 
 I'd appreciate to see more concrete clarifications, regarding the following 
 two points:
 
 - the documentation clearly says that repeated calls of startAsync() return 
 the same instance.
 - what does it mean to have called startAsync() called on the same dispatch, 
 does it apply to a current thread dispatch or to the whole suspended 
 continuation process ?
 
 To be honest, the positive statement on the multiple startAsync calls makes 
 me think the ISE case applies to this method called multiple times during the 
 same thread dispatch...
 
 Thanks, Sergey
 
 
 
 Cheers, Sergey
 
 
 
 The last issue that I identified with Servlet3ContinuationProvider is
 the isNew flag has incorrect initial value - it should be *true*.
 Sure - needs to be fixed
 
 Thanks
 
 
 Thanks, Sergey
 
 
 Cheers,
 
 Rio
 
 
 
 
 
 
 
 
 
 
 
 

-- 
Daniel Kulp
dk...@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com