You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Sanjiva Weerawarana <sa...@opensource.lk> on 2006/11/30 09:13:04 UTC

Re: svn commit: r480660 - in /webservices/axis2/trunk/java/modules: kernel/src/org/apache/axis2/engine/ kernel/src/org/apache/axis2/transport/ kernel/src/org/apache/axis2/transport/http/ samples/quickstartaxiom/src/samples/quickstart/clients/

On Wed, 2006-11-29 at 17:56 +0000, nagy@apache.org wrote:
> Author: nagy
> Date: Wed Nov 29 09:56:02 2006
> New Revision: 480660
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=480660 Log: Added a
>  control object/callback to the transport to allow other components to
>  provide processing information to the transport.  The modifications in
>  this patch allow the AxisServlet to be notified when a one-way message
>  has be processed far enough to be ack'd as per the specs.  (A similar
>  change, although warranted, was not made to the SimpleHTTPServer, as
>  the API does not seem to provide a means to return a response without
>  unwinding the call stack.)  The quickstart sample was modified to fix
>  a dependency that it had upon fire-and-forget invocations not
>  returning until the one-way message had been completely processed on
>  the server side (at least in the case of Axis2.)

This is very cool. How does the transport actually finish the message
though? I mean does it use the thread that's calling
acknowledgeMessage() to do whatever is needed then and there or rely on
some other thread coming back to let it fall through to the normal close
stuff?

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Re: svn commit: r480660 - in /webservices/axis2/trunk/java/modules: kernel/src/org/apache/axis2/engine/ kernel/src/org/apache/axis2/transport/ kernel/src/org/apache/axis2/transport/http/ samples/quickstartaxiom/src/samples/quickstart/clients/

Posted by Bill Nagy <na...@watson.ibm.com>.
Hi Sanjiva,

The acknowledgeMessage(...) method relies upon the transport being able
to respond before the initial call into the Axis2 code (e.g. doPost) is
unwound -- this works for the servlet transport as the
ServletResponse.flushBuffer() method commits the response then and
there, but doesn't work for the SimpleHTTPServer as I pointed out,
because the commons API doesn't seem to provide a similar mechanism.
The SimpleHTTPServer's implementation of acknowledgeMessage(...) (and
any others like it), with a little more work, could pause the message
and spawn another thread to continue processing, allowing the original
thread to be unwound and a response to be sent out as you indicated.
This seems rather ugly to me; I think a better solution would be to
convince the commons API folks to add the same functionality as the
Servlet API.

-Bill
  
On Thu, 2006-11-30 at 13:43 +0530, Sanjiva Weerawarana wrote:
> On Wed, 2006-11-29 at 17:56 +0000, nagy@apache.org wrote:
> > Author: nagy
> > Date: Wed Nov 29 09:56:02 2006
> > New Revision: 480660
> > 
> > URL: http://svn.apache.org/viewvc?view=rev&rev=480660 Log: Added a
> >  control object/callback to the transport to allow other components to
> >  provide processing information to the transport.  The modifications in
> >  this patch allow the AxisServlet to be notified when a one-way message
> >  has be processed far enough to be ack'd as per the specs.  (A similar
> >  change, although warranted, was not made to the SimpleHTTPServer, as
> >  the API does not seem to provide a means to return a response without
> >  unwinding the call stack.)  The quickstart sample was modified to fix
> >  a dependency that it had upon fire-and-forget invocations not
> >  returning until the one-way message had been completely processed on
> >  the server side (at least in the case of Axis2.)
> 
> This is very cool. How does the transport actually finish the message
> though? I mean does it use the thread that's calling
> acknowledgeMessage() to do whatever is needed then and there or rely on
> some other thread coming back to let it fall through to the normal close
> stuff?
> 
> Sanjiva.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Re: svn commit: r480660 - in /webservices/axis2/trunk/java/modules: kernel/src/org/apache/axis2/engine/ kernel/src/org/apache/axis2/transport/ kernel/src/org/apache/axis2/transport/http/ samples/quickstartaxiom/src/samples/quickstart/clients/

Posted by Bill Nagy <na...@watson.ibm.com>.
Hi Sanjiva,

The acknowledgeMessage(...) method relies upon the transport being able
to respond before the initial call into the Axis2 code (e.g. doPost) is
unwound -- this works for the servlet transport as the
ServletResponse.flushBuffer() method commits the response then and
there, but doesn't work for the SimpleHTTPServer as I pointed out,
because the commons API doesn't seem to provide a similar mechanism.
The SimpleHTTPServer's implementation of acknowledgeMessage(...) (and
any others like it), with a little more work, could pause the message
and spawn another thread to continue processing, allowing the original
thread to be unwound and a response to be sent out as you indicated.
This seems rather ugly to me; I think a better solution would be to
convince the commons API folks to add the same functionality as the
Servlet API.

-Bill
  
On Thu, 2006-11-30 at 13:43 +0530, Sanjiva Weerawarana wrote:
> On Wed, 2006-11-29 at 17:56 +0000, nagy@apache.org wrote:
> > Author: nagy
> > Date: Wed Nov 29 09:56:02 2006
> > New Revision: 480660
> > 
> > URL: http://svn.apache.org/viewvc?view=rev&rev=480660 Log: Added a
> >  control object/callback to the transport to allow other components to
> >  provide processing information to the transport.  The modifications in
> >  this patch allow the AxisServlet to be notified when a one-way message
> >  has be processed far enough to be ack'd as per the specs.  (A similar
> >  change, although warranted, was not made to the SimpleHTTPServer, as
> >  the API does not seem to provide a means to return a response without
> >  unwinding the call stack.)  The quickstart sample was modified to fix
> >  a dependency that it had upon fire-and-forget invocations not
> >  returning until the one-way message had been completely processed on
> >  the server side (at least in the case of Axis2.)
> 
> This is very cool. How does the transport actually finish the message
> though? I mean does it use the thread that's calling
> acknowledgeMessage() to do whatever is needed then and there or rely on
> some other thread coming back to let it fall through to the normal close
> stuff?
> 
> Sanjiva.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org