axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glyn Normington" <>
Subject Re: [Architecture Improvement] Handler lifecycle events and undo()
Date Mon, 17 Dec 2001 15:59:14 GMT
Doug Davis helpfully wrote:

>But since we seem to be at the point where people do want to examine
>the lifecycle of Handlers, here where I believe the hooks need to be:
>     1 - when a handler is created
>         - could probably be the c'tor
>         - general init stuff could go here
>         - ie. create pool of DB connections


>     2 - before a chain(service?) a handler is in is invoked
>         - this is when init() was supposed to be called
>         - could be for stuff like init'ing DB transactions

What about handlers which are not in chains? Would init be driven
just before invoke? Seems a little superfluous.

>     3 - invoke itself
>         - obviously need this one


>     4 - after a chain(service?) a handler is in is invoked
>         - complement to the init()
>         - could be for closing down stuff like DB transactions

Again, what about handlers which are not in chains?

>     5 - after the response message is done being read
>         - this is important for cleaning up stuff that was created
>           but still needed until the entire response message is
>           read.  For example, temporary attachment files.

I don't understand this. It seems to assume a single request response
message pattern. Or what if the response message is read in a different JVM
to the chain being considered?

>     6 - when a error happens
>         - allow a handler that was previously invoked() to
>           perfom some action when another handler, later on,
>           faults.  Whether this is as complex as rollback()
>           or simply a logError() type of thing is up to it.

I don't understand the scope here. What if a client node A calls an
intermediary node B which forwards the request to a server node C and then
the response flows back to B and then back to A and then a fault occurs.
Which handlers would get notified? All those in A, B, and C which had
already run or just those in A which had already run?


View raw message