axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Davis" <...@us.ibm.com>
Subject Callbacks?
Date Sat, 18 Aug 2001 19:35:52 GMT
One thing we need to look at adding (somehow), is
the ability for a handler to register some sort of
callback routine that will be called when the message
is done being processed.  Here's
the scenario:
   Client invokes Axis to send a message
   In the client transport chain is a sender that
     will send the message and waits for a response.
   When it gets the response, the sender places the
     response message into some persistence because
     it can't keep it all in memory.  It then constructs
     the response Axis.Message object passing in an
     InputStream to the constructor.
   The sender will then 'return'.
(A similar problem can occur on the server where a
handler constructs part of the message by giving the
Axis engine an InputStream.)
The problem is, the Sender is never notified when
Axis is done with the InputStream.  The most obvious
this is for Axis to call 'close' on it (with that being
the callback mechanism to the handler) but Axis can't
call close since in some cases the InputStream might be
the socket and closing the socket (in the server case)
would be bad.
It seems like there needs to be some other mechanism
in there for the handler to regain some sort of control
so it can free-up its resources.  At one time we talked
about the init/cleanup stuff doing this but I can't
remember where we left that discussion.  But, if we do
use that then we need to make sure that the cleanup
is called after the entire message is read from the
response Message object and not just after the chains
are done being invoked.

-Dug


Mime
View raw message