You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Remy Maucherat <re...@apache.org> on 2002/05/11 00:51:26 UTC

[4.1] Add additional events

I plan to add additional events to the components start and stop methods:
before_start, after_start, before_stop, after_stop. This has been suggested
and discussed a while ago, but never actually implemented.

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [4.1] Add additional events

Posted by Remy Maucherat <re...@apache.org>.
> On Fri, 10 May 2002, Remy Maucherat wrote:
>
> > Date: Fri, 10 May 2002 15:51:26 -0700
> > From: Remy Maucherat <re...@apache.org>
> > Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> > To: tomcat-dev@jakarta.apache.org
> > Subject: [4.1] Add additional events
> >
> > I plan to add additional events to the components start and stop
methods:
> > before_start, after_start, before_stop, after_stop. This has been
suggested
> > and discussed a while ago, but never actually implemented.
> >
>
> Are you thinking about adding new method calls to the Lifecycle interface,
> versus just some new event types?  If it's the former, a couple of
> thoughts:

I was only planning on new event types (4 of them, to be exact). I don't
remember who suggested that originally (maybe Bill). The two events used at
the moment (as well as their timing) will not be modified so that everything
remains backward compatible.

> * The initialize() method was added to o.a.c.Connector, primarily
>   to provide what I imagine you're thinking of as before_start --
>   I'd suggest either using this name or migrating it to before_start.

Actually, it was added to be able to call it through JNI, for the
port-80-without-root on unix.

> * There are quite a number of places that components implementing
>   Lifecycle are started and stopped dynamically -- dealing with
>   them all is a non-trivial amount of editing (although the changes
>   required are pretty straightforward).
>
> Adding just the extra event notifications makes sense, and is somewhat
> easier (although you still have to fire them from all the appropriate
> places), but doesn't give you quite as much flexibility in managing things
> since the listeners don't throw a checked exception.

Adding the extra calls would break compatibility, and I don't think we
should do that.

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [4.1] Add additional events

Posted by Bill Barker <wb...@wilshire.com>.
----- Original Message -----
From: <co...@covalent.net>
To: "Tomcat Developers List" <to...@jakarta.apache.org>
Sent: Friday, May 10, 2002 9:07 PM
Subject: Re: [4.1] Add additional events


> On Fri, 10 May 2002, Remy Maucherat wrote:
>
> > > > > I plan to add additional events to the components start and stop
> > methods:
> > > > > before_start, after_start, before_stop, after_stop. This has been
> > suggested
> > > > > and discussed a while ago, but never actually implemented.
> > >
> > > Could you also add events for webapp add/remove/start/stop, and make
sure
> > > the events are propagated up to coyote ?
> >
> > That's already there (more or less). You need to put a container
listener on
> > the host and listen for Container.ADD_CHILD_EVENT (or
REMOVE_CHILD_EVENT).
>
> The problem is propagating it via Coyote actions to jk level.
>

Presumably, you're transmitting it to Apache via Shm, so the Listener simple
needs an instanceof JkCoyoteHandler.  I agree with Remy that it is (more or
less) already there.

> Costin
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [4.1] Add additional events

Posted by co...@covalent.net.
On Fri, 10 May 2002, Remy Maucherat wrote:

> > > > I plan to add additional events to the components start and stop
> methods:
> > > > before_start, after_start, before_stop, after_stop. This has been
> suggested
> > > > and discussed a while ago, but never actually implemented.
> >
> > Could you also add events for webapp add/remove/start/stop, and make sure
> > the events are propagated up to coyote ?
> 
> That's already there (more or less). You need to put a container listener on
> the host and listen for Container.ADD_CHILD_EVENT (or REMOVE_CHILD_EVENT).

The problem is propagating it via Coyote actions to jk level. 

Costin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [4.1] Add additional events

Posted by Remy Maucherat <re...@apache.org>.
> > > I plan to add additional events to the components start and stop
methods:
> > > before_start, after_start, before_stop, after_stop. This has been
suggested
> > > and discussed a while ago, but never actually implemented.
>
> Could you also add events for webapp add/remove/start/stop, and make sure
> the events are propagated up to coyote ?

That's already there (more or less). You need to put a container listener on
the host and listen for Container.ADD_CHILD_EVENT (or REMOVE_CHILD_EVENT).

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [4.1] Add additional events

Posted by co...@covalent.net.
> > I plan to add additional events to the components start and stop methods:
> > before_start, after_start, before_stop, after_stop. This has been suggested
> > and discussed a while ago, but never actually implemented.

Could you also add events for webapp add/remove/start/stop, and make sure
the events are propagated up to coyote ? 


Costin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [4.1] Add additional events

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 10 May 2002, Remy Maucherat wrote:

> Date: Fri, 10 May 2002 15:51:26 -0700
> From: Remy Maucherat <re...@apache.org>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: tomcat-dev@jakarta.apache.org
> Subject: [4.1] Add additional events
>
> I plan to add additional events to the components start and stop methods:
> before_start, after_start, before_stop, after_stop. This has been suggested
> and discussed a while ago, but never actually implemented.
>

Are you thinking about adding new method calls to the Lifecycle interface,
versus just some new event types?  If it's the former, a couple of
thoughts:

* The initialize() method was added to o.a.c.Connector, primarily
  to provide what I imagine you're thinking of as before_start --
  I'd suggest either using this name or migrating it to before_start.

* There are quite a number of places that components implementing
  Lifecycle are started and stopped dynamically -- dealing with
  them all is a non-trivial amount of editing (although the changes
  required are pretty straightforward).

Adding just the extra event notifications makes sense, and is somewhat
easier (although you still have to fire them from all the appropriate
places), but doesn't give you quite as much flexibility in managing things
since the listeners don't throw a checked exception.

> Remy
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>