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 Chamikara Jayalath <ch...@gmail.com> on 2007/03/11 10:48:55 UTC

[Axis2] API Change - Handler flowComplete

Hi All,

Currently the Handler.flowComplete method does not throw any exceptions.
Shall we change this to throw out an AxisFault ?

Chamikara

AXIS2- Beginner question-regarding adding own modules

Posted by Inder Dhillon <dh...@cs.dal.ca>.
Hello

 

I am posting my question again, please help me with this. I am new user of
Axis2 and I am using Axis2-1.1.1 version. I was working on sample codes, but
while working on adding new custom modules, I am not able to run my client
application and its giving me the following error.

 



 

 

I have checked my axis2.xml file and everything is perfect over there. I am
also attaching my axis2.xml and module.xml files along with this mail. I'll
really appreciate if anyone can help me with this. And one more question, I
was trying to add my own handler but it was not working fine, could you
please tell me where exactly should I mention my handler class file ( I
tried to mention it in axis2.xml along with the phase rule declaration)

 

Thanks in advance.

 

Inder Dhillon

 

 

 

 

 

 


Re: [Axis2] API Change - Handler flowComplete

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Bill,

Sorry I wasn't clear. I was talking about the Robust InOnly case. In the
InOut case I can easily do my work by putting a Handler to the outFlow.

Basically I need to do some work for InOnly messages after the MR get
invoked and any faults should go back to the client. I thought flowComplete
method will be a good solutions for this. If it is not, I'll revert my
changes.

Thanks,
Chamikara


On 3/12/07, Bill Nagy <na...@watson.ibm.com> wrote:
>
> Hi Chamikara,
>
> If you are doing work that is a critical part of the interaction, and
> where an error needs to be communicated back to the requestor, then that
> work should be completed before the response message (assuming that the
> operation isn't one-way) is sent, so that that fault can be returned as
> the response  -- we don't have a MEP that supports any other style of
> interaction (e.g. sending a response followed by a fault.)  This can
> either be accomplished by placing the logic in the output flow (for
> req/rsp) or placing the entire req under a transaction.
>
> -Bill
>
> On Mon, 2007-03-12 at 20:36 +0530, Chamikara Jayalath wrote:
> > Hi Bill,
> >
> > What do u think of the use case where some handler want to do some
> > post-MR work. But still it may want to let the client know of any
> > exceptions that occured (through a SOAP fault).
> >
> > And as David sugested, we can make sure that the flowComplete of all
> > the handlers get called by enclosing it's invocation within a try
> > block and sending only the very first exception to the client.
> >
> > Chamikara
> >
> >
> > On 3/12/07, Bill Nagy <na...@watson.ibm.com> wrote:
> >         I purposely did not allow flowComplete(...) to throw an
> >         exception, as I
> >         have no idea what the runtime could possibly do if that occurs
> >         seeing as
> >         how all of the "important" work will have already been done
> >         and the
> >         connections most likely terminated.
> >
> >         I would prefer that we leave the interface explicit in this
> >         manner (i.e.
> >         not make handlers think that the runtime can/will do something
> >         useful
> >         with an exception by specifying it in the interface) unless we
> >         have a
> >         valid use case that says otherwise.
> >
> >         I believe that given the semantics of what flowComplete(...)
> >         is trying
> >         to accomplish, that simply logging the exception is a valid
> >         means of
> >         dealing with it.
> >
> >         -Bill
> >
> >
> >         On Mon, 2007-03-12 at 15:52 +0530, Chamikara Jayalath wrote:
> >         > Hi David,
> >         >
> >         > On 3/12/07, David Illsley <da...@gmail.com> wrote:
> >         >         So it's valid to do post MR work in flowComplete but
> >         swallow
> >         >         exceptions if they occur. The clearest example (in
> >         my mind) is
> >         >         removing a transaction from a thread. That itself
> >         could have a
> >         >         failure
> >         >         but it shouldn't prevent the other flocwCompletes
> >         bing
> >         >         called.
> >         >
> >         >         From the original proposal:
> >         >
> >         >         (If the flowComplete(...) method
> >         >         throws an exception, the rest of the handlers must
> >         still have
> >         >         their
> >         >         flowComplete(...) methods invoked.)
> >         >
> >         >         We could wrap the calls to flowComplete with a catch
> >         block,
> >         >         ensure all
> >         >         the flowCompletes are called and then throw a new
> >         exception
> >         >         with the
> >         >         rootCause of the fist exception caught.
> >         >
> >         >
> >         > That looks like a good option. Will try to implement that.
> >         >
> >         > Chamikara
> >         >
> >         >
> >         >
> >         >         David
> >         >
> >         >         On 12/03/07, Chamikara Jayalath
> >         <ch...@gmail.com> wrote:
> >         >         > Hi David,
> >         >         >
> >         >         > See your point. We need to clearly define the
> >         semantics
> >         >         here. With my
> >         >         > change, once an exception get thrown the rest of
> >         the
> >         >         handlers will not be
> >         >         > called.
> >         >         >
> >         >         > I was using the flowComplete method as a way to do
> >         some post
> >         >         MR work (both
> >         >         > here and in Sandesha2). If we do not throw out an
> >         exception,
> >         >         that should not
> >         >         > be recommended. (In that case I will revert my
> >         change).
> >         >         >
> >         >         >
> >         >         > Chamikara
> >         >         >
> >         >         >
> >         >         > On 3/12/07, David Illsley <da...@gmail.com>
> >         wrote:
> >         >         > > Hmm, I'm not sure that an exception there is the
> >         right
> >         >         thing to do...
> >         >         > > but I'll take a look at the code and get back to
> >         you.
> >         >         > >
> >         >         > > I do have a concern that the whole point of
> >         flowComplete
> >         >         is to let
> >         >         > > handlers get a callback when the flow is
> >         complete. If one
> >         >         of them
> >         >         > > thows an AxisFault, will the remaining handlers
> >         get
> >         >         flowComplete
> >         >         > > called?
> >         >         > >
> >         >         > > David
> >         >         > >
> >         >         > > On 12/03/07, Chamikara Jayalath
> >         <ch...@gmail.com>
> >         >         wrote:
> >         >         > > > Yep. (just committed this).
> >         >         > > > In the clustering impl I needed to do some
> >         replication
> >         >         stuff in the
> >         >         > > > flowComplete method. Didn't want to eat up
> >         exceptions
> >         >         with only a log
> >         >         >:-)
> >         >         > > >
> >         >         > > > Chamikara
> >         >         > > >
> >         >         > > >
> >         >         > > >
> >         >         > > >  On 3/12/07, David Illsley <
> >         davidillsley@gmail.com >
> >         >         wrote:
> >         >         > > > >
> >         >         > > > > Hi,
> >         >         > > > > I imagine there's a reason why you want to
> >         do this...?
> >         >         > > > > David
> >         >         > > > >
> >         >         > > > > On 11/03/07, Chamikara Jayalath <
> >         >         chamikaramj@gmail.com> wrote:
> >         >         > > > > > Hi All,
> >         >         > > > > >
> >         >         > > > > > Currently the Handler.flowComplete method
> >         does not
> >         >         throw any
> >         >         > exceptions.
> >         >         > > > > > Shall we change this to throw out an
> >         AxisFault ?
> >         >         > > > > >
> >         >         > > > > > Chamikara
> >         >         > > > > >
> >         >         > > > >
> >         >         > > > >
> >         >         > > > > --
> >         >         > > > > David Illsley - IBM Web Services Development
> >         >         > > > >
> >         >         > > > >
> >         >         > > >
> >         >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         > > > > To unsubscribe, e-mail:
> >         >         > > > axis-dev-unsubscribe@ws.apache.org
> >         >         > > > > For additional commands, e-mail:
> >         >         axis-dev-help@ws.apache.org
> >         >         > > > >
> >         >         > > > >
> >         >         > > >
> >         >         > > >
> >         >         > >
> >         >         > >
> >         >         > > --
> >         >         > > David Illsley - IBM Web Services Development
> >         >         > >
> >         >         > >
> >         >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         > > To unsubscribe, e-mail:
> >         >         > axis-dev-unsubscribe@ws.apache.org
> >         >         > > For additional commands, e-mail:
> >         >         axis-dev-help@ws.apache.org
> >         >         > >
> >         >         > >
> >         >         >
> >         >         >
> >         >
> >         >
> >         >         --
> >         >         David Illsley - IBM Web Services Development
> >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         To unsubscribe, e-mail:
> >         axis-dev-unsubscribe@ws.apache.org
> >         >         For additional commands, e-mail:
> >         axis-dev-help@ws.apache.org
> >         >
> >         >
> >
> >
> >
> ---------------------------------------------------------------------
> >         To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >         For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: [Axis2] API Change - Handler flowComplete

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

If you are doing work that is a critical part of the interaction, and
where an error needs to be communicated back to the requestor, then that
work should be completed before the response message (assuming that the
operation isn't one-way) is sent, so that that fault can be returned as
the response  -- we don't have a MEP that supports any other style of
interaction (e.g. sending a response followed by a fault.)  This can
either be accomplished by placing the logic in the output flow (for
req/rsp) or placing the entire req under a transaction.

-Bill

On Mon, 2007-03-12 at 20:36 +0530, Chamikara Jayalath wrote:
> Hi Bill,
> 
> What do u think of the use case where some handler want to do some
> post-MR work. But still it may want to let the client know of any
> exceptions that occured (through a SOAP fault).
> 
> And as David sugested, we can make sure that the flowComplete of all
> the handlers get called by enclosing it's invocation within a try
> block and sending only the very first exception to the client. 
> 
> Chamikara
> 
> 
> On 3/12/07, Bill Nagy <na...@watson.ibm.com> wrote:
>         I purposely did not allow flowComplete(...) to throw an
>         exception, as I
>         have no idea what the runtime could possibly do if that occurs
>         seeing as
>         how all of the "important" work will have already been done
>         and the 
>         connections most likely terminated.
>         
>         I would prefer that we leave the interface explicit in this
>         manner (i.e.
>         not make handlers think that the runtime can/will do something
>         useful
>         with an exception by specifying it in the interface) unless we
>         have a 
>         valid use case that says otherwise.
>         
>         I believe that given the semantics of what flowComplete(...)
>         is trying
>         to accomplish, that simply logging the exception is a valid
>         means of
>         dealing with it.
>         
>         -Bill 
>         
>         
>         On Mon, 2007-03-12 at 15:52 +0530, Chamikara Jayalath wrote:
>         > Hi David,
>         >
>         > On 3/12/07, David Illsley <da...@gmail.com> wrote:
>         >         So it's valid to do post MR work in flowComplete but
>         swallow 
>         >         exceptions if they occur. The clearest example (in
>         my mind) is
>         >         removing a transaction from a thread. That itself
>         could have a
>         >         failure
>         >         but it shouldn't prevent the other flocwCompletes
>         bing 
>         >         called.
>         >
>         >         From the original proposal:
>         >
>         >         (If the flowComplete(...) method
>         >         throws an exception, the rest of the handlers must
>         still have
>         >         their 
>         >         flowComplete(...) methods invoked.)
>         >
>         >         We could wrap the calls to flowComplete with a catch
>         block,
>         >         ensure all
>         >         the flowCompletes are called and then throw a new
>         exception 
>         >         with the
>         >         rootCause of the fist exception caught.
>         >
>         >
>         > That looks like a good option. Will try to implement that.
>         >
>         > Chamikara
>         >
>         >
>         >
>         >         David 
>         >
>         >         On 12/03/07, Chamikara Jayalath
>         <ch...@gmail.com> wrote:
>         >         > Hi David,
>         >         >
>         >         > See your point. We need to clearly define the
>         semantics 
>         >         here. With my
>         >         > change, once an exception get thrown the rest of
>         the
>         >         handlers will not be
>         >         > called.
>         >         >
>         >         > I was using the flowComplete method as a way to do
>         some post 
>         >         MR work (both
>         >         > here and in Sandesha2). If we do not throw out an
>         exception,
>         >         that should not
>         >         > be recommended. (In that case I will revert my
>         change). 
>         >         >
>         >         >
>         >         > Chamikara
>         >         >
>         >         >
>         >         > On 3/12/07, David Illsley <da...@gmail.com>
>         wrote:
>         >         > > Hmm, I'm not sure that an exception there is the
>         right
>         >         thing to do...
>         >         > > but I'll take a look at the code and get back to
>         you.
>         >         > > 
>         >         > > I do have a concern that the whole point of
>         flowComplete
>         >         is to let
>         >         > > handlers get a callback when the flow is
>         complete. If one
>         >         of them
>         >         > > thows an AxisFault, will the remaining handlers
>         get
>         >         flowComplete
>         >         > > called?
>         >         > >
>         >         > > David
>         >         > > 
>         >         > > On 12/03/07, Chamikara Jayalath
>         <ch...@gmail.com>
>         >         wrote:
>         >         > > > Yep. (just committed this).
>         >         > > > In the clustering impl I needed to do some
>         replication 
>         >         stuff in the
>         >         > > > flowComplete method. Didn't want to eat up
>         exceptions
>         >         with only a log
>         >         >:-)
>         >         > > >
>         >         > > > Chamikara 
>         >         > > >
>         >         > > >
>         >         > > >
>         >         > > >  On 3/12/07, David Illsley <
>         davidillsley@gmail.com >
>         >         wrote:
>         >         > > > >
>         >         > > > > Hi,
>         >         > > > > I imagine there's a reason why you want to
>         do this...?
>         >         > > > > David 
>         >         > > > >
>         >         > > > > On 11/03/07, Chamikara Jayalath <
>         >         chamikaramj@gmail.com> wrote:
>         >         > > > > > Hi All, 
>         >         > > > > >
>         >         > > > > > Currently the Handler.flowComplete method
>         does not
>         >         throw any
>         >         > exceptions.
>         >         > > > > > Shall we change this to throw out an
>         AxisFault ? 
>         >         > > > > >
>         >         > > > > > Chamikara
>         >         > > > > >
>         >         > > > >
>         >         > > > >
>         >         > > > > -- 
>         >         > > > > David Illsley - IBM Web Services Development
>         >         > > > >
>         >         > > > >
>         >         > > >
>         >         >
>         >
>         --------------------------------------------------------------------- 
>         >         > > > > To unsubscribe, e-mail:
>         >         > > > axis-dev-unsubscribe@ws.apache.org
>         >         > > > > For additional commands, e-mail: 
>         >         axis-dev-help@ws.apache.org
>         >         > > > >
>         >         > > > >
>         >         > > >
>         >         > > > 
>         >         > >
>         >         > >
>         >         > > --
>         >         > > David Illsley - IBM Web Services Development
>         >         > >
>         >         > >
>         >         > 
>         >
>         ---------------------------------------------------------------------
>         >         > > To unsubscribe, e-mail:
>         >         > axis-dev-unsubscribe@ws.apache.org
>         >         > > For additional commands, e-mail:
>         >         axis-dev-help@ws.apache.org
>         >         > >
>         >         > >
>         >         > 
>         >         >
>         >
>         >
>         >         --
>         >         David Illsley - IBM Web Services Development
>         >
>         >
>         ---------------------------------------------------------------------
>         >         To unsubscribe, e-mail:
>         axis-dev-unsubscribe@ws.apache.org
>         >         For additional commands, e-mail:
>         axis-dev-help@ws.apache.org
>         > 
>         >
>         
>         
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>         For additional commands, e-mail: axis-dev-help@ws.apache.org
>         
> 


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


Re: [Axis2] API Change - Handler flowComplete

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Bill,

What do u think of the use case where some handler want to do some post-MR
work. But still it may want to let the client know of any exceptions that
occured (through a SOAP fault).

And as David sugested, we can make sure that the flowComplete of all the
handlers get called by enclosing it's invocation within a try block and
sending only the very first exception to the client.

Chamikara


On 3/12/07, Bill Nagy <na...@watson.ibm.com> wrote:
>
> I purposely did not allow flowComplete(...) to throw an exception, as I
> have no idea what the runtime could possibly do if that occurs seeing as
> how all of the "important" work will have already been done and the
> connections most likely terminated.
>
> I would prefer that we leave the interface explicit in this manner (i.e.
> not make handlers think that the runtime can/will do something useful
> with an exception by specifying it in the interface) unless we have a
> valid use case that says otherwise.
>
> I believe that given the semantics of what flowComplete(...) is trying
> to accomplish, that simply logging the exception is a valid means of
> dealing with it.
>
> -Bill
>
>
> On Mon, 2007-03-12 at 15:52 +0530, Chamikara Jayalath wrote:
> > Hi David,
> >
> > On 3/12/07, David Illsley <da...@gmail.com> wrote:
> >         So it's valid to do post MR work in flowComplete but swallow
> >         exceptions if they occur. The clearest example (in my mind) is
> >         removing a transaction from a thread. That itself could have a
> >         failure
> >         but it shouldn't prevent the other flocwCompletes bing
> >         called.
> >
> >         From the original proposal:
> >
> >         (If the flowComplete(...) method
> >         throws an exception, the rest of the handlers must still have
> >         their
> >         flowComplete(...) methods invoked.)
> >
> >         We could wrap the calls to flowComplete with a catch block,
> >         ensure all
> >         the flowCompletes are called and then throw a new exception
> >         with the
> >         rootCause of the fist exception caught.
> >
> >
> > That looks like a good option. Will try to implement that.
> >
> > Chamikara
> >
> >
> >
> >         David
> >
> >         On 12/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> >         > Hi David,
> >         >
> >         > See your point. We need to clearly define the semantics
> >         here. With my
> >         > change, once an exception get thrown the rest of the
> >         handlers will not be
> >         > called.
> >         >
> >         > I was using the flowComplete method as a way to do some post
> >         MR work (both
> >         > here and in Sandesha2). If we do not throw out an exception,
> >         that should not
> >         > be recommended. (In that case I will revert my change).
> >         >
> >         >
> >         > Chamikara
> >         >
> >         >
> >         > On 3/12/07, David Illsley <da...@gmail.com> wrote:
> >         > > Hmm, I'm not sure that an exception there is the right
> >         thing to do...
> >         > > but I'll take a look at the code and get back to you.
> >         > >
> >         > > I do have a concern that the whole point of flowComplete
> >         is to let
> >         > > handlers get a callback when the flow is complete. If one
> >         of them
> >         > > thows an AxisFault, will the remaining handlers get
> >         flowComplete
> >         > > called?
> >         > >
> >         > > David
> >         > >
> >         > > On 12/03/07, Chamikara Jayalath <ch...@gmail.com>
> >         wrote:
> >         > > > Yep. (just committed this).
> >         > > > In the clustering impl I needed to do some replication
> >         stuff in the
> >         > > > flowComplete method. Didn't want to eat up exceptions
> >         with only a log
> >         >:-)
> >         > > >
> >         > > > Chamikara
> >         > > >
> >         > > >
> >         > > >
> >         > > >  On 3/12/07, David Illsley < davidillsley@gmail.com>
> >         wrote:
> >         > > > >
> >         > > > > Hi,
> >         > > > > I imagine there's a reason why you want to do this...?
> >         > > > > David
> >         > > > >
> >         > > > > On 11/03/07, Chamikara Jayalath <
> >         chamikaramj@gmail.com> wrote:
> >         > > > > > Hi All,
> >         > > > > >
> >         > > > > > Currently the Handler.flowComplete method does not
> >         throw any
> >         > exceptions.
> >         > > > > > Shall we change this to throw out an AxisFault ?
> >         > > > > >
> >         > > > > > Chamikara
> >         > > > > >
> >         > > > >
> >         > > > >
> >         > > > > --
> >         > > > > David Illsley - IBM Web Services Development
> >         > > > >
> >         > > > >
> >         > > >
> >         >
> >
> ---------------------------------------------------------------------
> >         > > > > To unsubscribe, e-mail:
> >         > > > axis-dev-unsubscribe@ws.apache.org
> >         > > > > For additional commands, e-mail:
> >         axis-dev-help@ws.apache.org
> >         > > > >
> >         > > > >
> >         > > >
> >         > > >
> >         > >
> >         > >
> >         > > --
> >         > > David Illsley - IBM Web Services Development
> >         > >
> >         > >
> >         >
> >
> ---------------------------------------------------------------------
> >         > > To unsubscribe, e-mail:
> >         > axis-dev-unsubscribe@ws.apache.org
> >         > > For additional commands, e-mail:
> >         axis-dev-help@ws.apache.org
> >         > >
> >         > >
> >         >
> >         >
> >
> >
> >         --
> >         David Illsley - IBM Web Services Development
> >
> >
> ---------------------------------------------------------------------
> >         To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >         For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: [Axis2] API Change - Handler flowComplete

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
+1.

Sanjiva.

Bill Nagy wrote:
> I purposely did not allow flowComplete(...) to throw an exception, as I
> have no idea what the runtime could possibly do if that occurs seeing as
> how all of the "important" work will have already been done and the
> connections most likely terminated.
> 
> I would prefer that we leave the interface explicit in this manner (i.e.
> not make handlers think that the runtime can/will do something useful
> with an exception by specifying it in the interface) unless we have a
> valid use case that says otherwise.
> 
> I believe that given the semantics of what flowComplete(...) is trying
> to accomplish, that simply logging the exception is a valid means of
> dealing with it. 
> 
> -Bill
> 
> 
> On Mon, 2007-03-12 at 15:52 +0530, Chamikara Jayalath wrote:
>> Hi David,
>>
>> On 3/12/07, David Illsley <da...@gmail.com> wrote:
>>         So it's valid to do post MR work in flowComplete but swallow
>>         exceptions if they occur. The clearest example (in my mind) is
>>         removing a transaction from a thread. That itself could have a
>>         failure
>>         but it shouldn't prevent the other flocwCompletes bing
>>         called. 
>>         
>>         From the original proposal:
>>         
>>         (If the flowComplete(...) method
>>         throws an exception, the rest of the handlers must still have
>>         their
>>         flowComplete(...) methods invoked.)
>>         
>>         We could wrap the calls to flowComplete with a catch block,
>>         ensure all 
>>         the flowCompletes are called and then throw a new exception
>>         with the
>>         rootCause of the fist exception caught.
>>
>>
>> That looks like a good option. Will try to implement that.
>>
>> Chamikara
>>
>>  
>>
>>         David
>>         
>>         On 12/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
>>         > Hi David,
>>         >
>>         > See your point. We need to clearly define the semantics
>>         here. With my
>>         > change, once an exception get thrown the rest of the
>>         handlers will not be 
>>         > called.
>>         >
>>         > I was using the flowComplete method as a way to do some post
>>         MR work (both
>>         > here and in Sandesha2). If we do not throw out an exception,
>>         that should not
>>         > be recommended. (In that case I will revert my change). 
>>         >
>>         >
>>         > Chamikara
>>         >
>>         >
>>         > On 3/12/07, David Illsley <da...@gmail.com> wrote:
>>         > > Hmm, I'm not sure that an exception there is the right
>>         thing to do... 
>>         > > but I'll take a look at the code and get back to you.
>>         > >
>>         > > I do have a concern that the whole point of flowComplete
>>         is to let
>>         > > handlers get a callback when the flow is complete. If one
>>         of them 
>>         > > thows an AxisFault, will the remaining handlers get
>>         flowComplete
>>         > > called?
>>         > >
>>         > > David
>>         > >
>>         > > On 12/03/07, Chamikara Jayalath <ch...@gmail.com>
>>         wrote:
>>         > > > Yep. (just committed this).
>>         > > > In the clustering impl I needed to do some replication
>>         stuff in the
>>         > > > flowComplete method. Didn't want to eat up exceptions
>>         with only a log 
>>         >:-)
>>         > > >
>>         > > > Chamikara
>>         > > >
>>         > > >
>>         > > >
>>         > > >  On 3/12/07, David Illsley < davidillsley@gmail.com>
>>         wrote:
>>         > > > >
>>         > > > > Hi,
>>         > > > > I imagine there's a reason why you want to do this...?
>>         > > > > David
>>         > > > >
>>         > > > > On 11/03/07, Chamikara Jayalath <
>>         chamikaramj@gmail.com> wrote:
>>         > > > > > Hi All,
>>         > > > > >
>>         > > > > > Currently the Handler.flowComplete method does not
>>         throw any 
>>         > exceptions.
>>         > > > > > Shall we change this to throw out an AxisFault ?
>>         > > > > >
>>         > > > > > Chamikara
>>         > > > > >
>>         > > > >
>>         > > > > 
>>         > > > > --
>>         > > > > David Illsley - IBM Web Services Development
>>         > > > >
>>         > > > >
>>         > > >
>>         >
>>         --------------------------------------------------------------------- 
>>         > > > > To unsubscribe, e-mail:
>>         > > > axis-dev-unsubscribe@ws.apache.org
>>         > > > > For additional commands, e-mail:
>>         axis-dev-help@ws.apache.org
>>         > > > >
>>         > > > >
>>         > > >
>>         > > >
>>         > >
>>         > >
>>         > > --
>>         > > David Illsley - IBM Web Services Development
>>         > > 
>>         > >
>>         >
>>         ---------------------------------------------------------------------
>>         > > To unsubscribe, e-mail:
>>         > axis-dev-unsubscribe@ws.apache.org
>>         > > For additional commands, e-mail:
>>         axis-dev-help@ws.apache.org
>>         > >
>>         > >
>>         >
>>         >
>>         
>>         
>>         --
>>         David Illsley - IBM Web Services Development 
>>         
>>         ---------------------------------------------------------------------
>>         To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>>         For additional commands, e-mail: axis-dev-help@ws.apache.org
>>         
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
> 
> 

-- 
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-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] API Change - Handler flowComplete

Posted by Bill Nagy <na...@watson.ibm.com>.
I purposely did not allow flowComplete(...) to throw an exception, as I
have no idea what the runtime could possibly do if that occurs seeing as
how all of the "important" work will have already been done and the
connections most likely terminated.

I would prefer that we leave the interface explicit in this manner (i.e.
not make handlers think that the runtime can/will do something useful
with an exception by specifying it in the interface) unless we have a
valid use case that says otherwise.

I believe that given the semantics of what flowComplete(...) is trying
to accomplish, that simply logging the exception is a valid means of
dealing with it. 

-Bill


On Mon, 2007-03-12 at 15:52 +0530, Chamikara Jayalath wrote:
> Hi David,
> 
> On 3/12/07, David Illsley <da...@gmail.com> wrote:
>         So it's valid to do post MR work in flowComplete but swallow
>         exceptions if they occur. The clearest example (in my mind) is
>         removing a transaction from a thread. That itself could have a
>         failure
>         but it shouldn't prevent the other flocwCompletes bing
>         called. 
>         
>         From the original proposal:
>         
>         (If the flowComplete(...) method
>         throws an exception, the rest of the handlers must still have
>         their
>         flowComplete(...) methods invoked.)
>         
>         We could wrap the calls to flowComplete with a catch block,
>         ensure all 
>         the flowCompletes are called and then throw a new exception
>         with the
>         rootCause of the fist exception caught.
> 
> 
> That looks like a good option. Will try to implement that.
> 
> Chamikara
> 
>  
> 
>         David
>         
>         On 12/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
>         > Hi David,
>         >
>         > See your point. We need to clearly define the semantics
>         here. With my
>         > change, once an exception get thrown the rest of the
>         handlers will not be 
>         > called.
>         >
>         > I was using the flowComplete method as a way to do some post
>         MR work (both
>         > here and in Sandesha2). If we do not throw out an exception,
>         that should not
>         > be recommended. (In that case I will revert my change). 
>         >
>         >
>         > Chamikara
>         >
>         >
>         > On 3/12/07, David Illsley <da...@gmail.com> wrote:
>         > > Hmm, I'm not sure that an exception there is the right
>         thing to do... 
>         > > but I'll take a look at the code and get back to you.
>         > >
>         > > I do have a concern that the whole point of flowComplete
>         is to let
>         > > handlers get a callback when the flow is complete. If one
>         of them 
>         > > thows an AxisFault, will the remaining handlers get
>         flowComplete
>         > > called?
>         > >
>         > > David
>         > >
>         > > On 12/03/07, Chamikara Jayalath <ch...@gmail.com>
>         wrote:
>         > > > Yep. (just committed this).
>         > > > In the clustering impl I needed to do some replication
>         stuff in the
>         > > > flowComplete method. Didn't want to eat up exceptions
>         with only a log 
>         >:-)
>         > > >
>         > > > Chamikara
>         > > >
>         > > >
>         > > >
>         > > >  On 3/12/07, David Illsley < davidillsley@gmail.com>
>         wrote:
>         > > > >
>         > > > > Hi,
>         > > > > I imagine there's a reason why you want to do this...?
>         > > > > David
>         > > > >
>         > > > > On 11/03/07, Chamikara Jayalath <
>         chamikaramj@gmail.com> wrote:
>         > > > > > Hi All,
>         > > > > >
>         > > > > > Currently the Handler.flowComplete method does not
>         throw any 
>         > exceptions.
>         > > > > > Shall we change this to throw out an AxisFault ?
>         > > > > >
>         > > > > > Chamikara
>         > > > > >
>         > > > >
>         > > > > 
>         > > > > --
>         > > > > David Illsley - IBM Web Services Development
>         > > > >
>         > > > >
>         > > >
>         >
>         --------------------------------------------------------------------- 
>         > > > > To unsubscribe, e-mail:
>         > > > axis-dev-unsubscribe@ws.apache.org
>         > > > > For additional commands, e-mail:
>         axis-dev-help@ws.apache.org
>         > > > >
>         > > > >
>         > > >
>         > > >
>         > >
>         > >
>         > > --
>         > > David Illsley - IBM Web Services Development
>         > > 
>         > >
>         >
>         ---------------------------------------------------------------------
>         > > To unsubscribe, e-mail:
>         > axis-dev-unsubscribe@ws.apache.org
>         > > For additional commands, e-mail:
>         axis-dev-help@ws.apache.org
>         > >
>         > >
>         >
>         >
>         
>         
>         --
>         David Illsley - IBM Web Services Development 
>         
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>         For additional commands, e-mail: axis-dev-help@ws.apache.org
>         
> 


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


Re: [Axis2] API Change - Handler flowComplete

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi David,

On 3/12/07, David Illsley <da...@gmail.com> wrote:
>
> So it's valid to do post MR work in flowComplete but swallow
> exceptions if they occur. The clearest example (in my mind) is
> removing a transaction from a thread. That itself could have a failure
> but it shouldn't prevent the other flocwCompletes bing called.
>
> From the original proposal:
>
> (If the flowComplete(...) method
> throws an exception, the rest of the handlers must still have their
> flowComplete(...) methods invoked.)
>
> We could wrap the calls to flowComplete with a catch block, ensure all
> the flowCompletes are called and then throw a new exception with the
> rootCause of the fist exception caught.



That looks like a good option. Will try to implement that.

Chamikara



David
>
> On 12/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> > Hi David,
> >
> > See your point. We need to clearly define the semantics here. With my
> > change, once an exception get thrown the rest of the handlers will not
> be
> > called.
> >
> > I was using the flowComplete method as a way to do some post MR work
> (both
> > here and in Sandesha2). If we do not throw out an exception, that should
> not
> > be recommended. (In that case I will revert my change).
> >
> >
> > Chamikara
> >
> >
> > On 3/12/07, David Illsley <da...@gmail.com> wrote:
> > > Hmm, I'm not sure that an exception there is the right thing to do...
> > > but I'll take a look at the code and get back to you.
> > >
> > > I do have a concern that the whole point of flowComplete is to let
> > > handlers get a callback when the flow is complete. If one of them
> > > thows an AxisFault, will the remaining handlers get flowComplete
> > > called?
> > >
> > > David
> > >
> > > On 12/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> > > > Yep. (just committed this).
> > > > In the clustering impl I needed to do some replication stuff in the
> > > > flowComplete method. Didn't want to eat up exceptions with only a
> log
> > :-)
> > > >
> > > > Chamikara
> > > >
> > > >
> > > >
> > > >  On 3/12/07, David Illsley < davidillsley@gmail.com> wrote:
> > > > >
> > > > > Hi,
> > > > > I imagine there's a reason why you want to do this...?
> > > > > David
> > > > >
> > > > > On 11/03/07, Chamikara Jayalath < chamikaramj@gmail.com> wrote:
> > > > > > Hi All,
> > > > > >
> > > > > > Currently the Handler.flowComplete method does not throw any
> > exceptions.
> > > > > > Shall we change this to throw out an AxisFault ?
> > > > > >
> > > > > > Chamikara
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > David Illsley - IBM Web Services Development
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > axis-dev-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > David Illsley - IBM Web Services Development
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> --
> David Illsley - IBM Web Services Development
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: [Axis2] API Change - Handler flowComplete

Posted by David Illsley <da...@gmail.com>.
So it's valid to do post MR work in flowComplete but swallow
exceptions if they occur. The clearest example (in my mind) is
removing a transaction from a thread. That itself could have a failure
but it shouldn't prevent the other flocwCompletes bing called.

>From the original proposal:

(If the flowComplete(...) method
throws an exception, the rest of the handlers must still have their
flowComplete(...) methods invoked.)

We could wrap the calls to flowComplete with a catch block, ensure all
the flowCompletes are called and then throw a new exception with the
rootCause of the fist exception caught.

David

On 12/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> Hi David,
>
> See your point. We need to clearly define the semantics here. With my
> change, once an exception get thrown the rest of the handlers will not be
> called.
>
> I was using the flowComplete method as a way to do some post MR work (both
> here and in Sandesha2). If we do not throw out an exception, that should not
> be recommended. (In that case I will revert my change).
>
>
> Chamikara
>
>
> On 3/12/07, David Illsley <da...@gmail.com> wrote:
> > Hmm, I'm not sure that an exception there is the right thing to do...
> > but I'll take a look at the code and get back to you.
> >
> > I do have a concern that the whole point of flowComplete is to let
> > handlers get a callback when the flow is complete. If one of them
> > thows an AxisFault, will the remaining handlers get flowComplete
> > called?
> >
> > David
> >
> > On 12/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> > > Yep. (just committed this).
> > > In the clustering impl I needed to do some replication stuff in the
> > > flowComplete method. Didn't want to eat up exceptions with only a log
> :-)
> > >
> > > Chamikara
> > >
> > >
> > >
> > >  On 3/12/07, David Illsley < davidillsley@gmail.com> wrote:
> > > >
> > > > Hi,
> > > > I imagine there's a reason why you want to do this...?
> > > > David
> > > >
> > > > On 11/03/07, Chamikara Jayalath < chamikaramj@gmail.com> wrote:
> > > > > Hi All,
> > > > >
> > > > > Currently the Handler.flowComplete method does not throw any
> exceptions.
> > > > > Shall we change this to throw out an AxisFault ?
> > > > >
> > > > > Chamikara
> > > > >
> > > >
> > > >
> > > > --
> > > > David Illsley - IBM Web Services Development
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > axis-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > David Illsley - IBM Web Services Development
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>


-- 
David Illsley - IBM Web Services Development

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


Re: [Axis2] API Change - Handler flowComplete

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi David,

See your point. We need to clearly define the semantics here. With my
change, once an exception get thrown the rest of the handlers will not be
called.

I was using the flowComplete method as a way to do some post MR work (both
here and in Sandesha2). If we do not throw out an exception, that should not
be recommended. (In that case I will revert my change).

Chamikara


On 3/12/07, David Illsley <da...@gmail.com> wrote:
>
> Hmm, I'm not sure that an exception there is the right thing to do...
> but I'll take a look at the code and get back to you.
>
> I do have a concern that the whole point of flowComplete is to let
> handlers get a callback when the flow is complete. If one of them
> thows an AxisFault, will the remaining handlers get flowComplete
> called?
>
> David
>
> On 12/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> > Yep. (just committed this).
> > In the clustering impl I needed to do some replication stuff in the
> > flowComplete method. Didn't want to eat up exceptions with only a log
> :-)
> >
> > Chamikara
> >
> >
> >
> >  On 3/12/07, David Illsley <da...@gmail.com> wrote:
> > >
> > > Hi,
> > > I imagine there's a reason why you want to do this...?
> > > David
> > >
> > > On 11/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> > > > Hi All,
> > > >
> > > > Currently the Handler.flowComplete method does not throw any
> exceptions.
> > > > Shall we change this to throw out an AxisFault ?
> > > >
> > > > Chamikara
> > > >
> > >
> > >
> > > --
> > > David Illsley - IBM Web Services Development
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> --
> David Illsley - IBM Web Services Development
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: [Axis2] API Change - Handler flowComplete

Posted by David Illsley <da...@gmail.com>.
Hmm, I'm not sure that an exception there is the right thing to do...
but I'll take a look at the code and get back to you.

I do have a concern that the whole point of flowComplete is to let
handlers get a callback when the flow is complete. If one of them
thows an AxisFault, will the remaining handlers get flowComplete
called?

David

On 12/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> Yep. (just committed this).
> In the clustering impl I needed to do some replication stuff in the
> flowComplete method. Didn't want to eat up exceptions with only a log :-)
>
> Chamikara
>
>
>
>  On 3/12/07, David Illsley <da...@gmail.com> wrote:
> >
> > Hi,
> > I imagine there's a reason why you want to do this...?
> > David
> >
> > On 11/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> > > Hi All,
> > >
> > > Currently the Handler.flowComplete method does not throw any exceptions.
> > > Shall we change this to throw out an AxisFault ?
> > >
> > > Chamikara
> > >
> >
> >
> > --
> > David Illsley - IBM Web Services Development
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>


-- 
David Illsley - IBM Web Services Development

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


Re: [Axis2] API Change - Handler flowComplete

Posted by Chamikara Jayalath <ch...@gmail.com>.
Yep. (just committed this).
In the clustering impl I needed to do some replication stuff in the
flowComplete method. Didn't want to eat up exceptions with only a log :-)

Chamikara


On 3/12/07, David Illsley <da...@gmail.com> wrote:
>
> Hi,
> I imagine there's a reason why you want to do this...?
> David
>
> On 11/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> > Hi All,
> >
> > Currently the Handler.flowComplete method does not throw any exceptions.
> > Shall we change this to throw out an AxisFault ?
> >
> > Chamikara
> >
>
>
> --
> David Illsley - IBM Web Services Development
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: [Axis2] API Change - Handler flowComplete

Posted by David Illsley <da...@gmail.com>.
Hi,
I imagine there's a reason why you want to do this...?
David

On 11/03/07, Chamikara Jayalath <ch...@gmail.com> wrote:
> Hi All,
>
> Currently the Handler.flowComplete method does not throw any exceptions.
> Shall we change this to throw out an AxisFault ?
>
> Chamikara
>


-- 
David Illsley - IBM Web Services Development

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