Leo Simons wrote:
> 
> > > 5 - it is currently stated that start(), run() and stop() may be
> > > called multiple times. I have a problem with that - some Components
> > > may not support this behaviour (I don't think they should), while
> > > some containers may require it. The replacement would be the use
> > > of Commands.
> >
> > Think of a J2EE server.  It should be possible for the administrator
> > to stop and restart the Servlet Container as many times as they need.
> > The important contracts to maintain are that start() cannot be called
> > before initialize(), and stop() cannot be called after dispose(), and
> > that Interruptable methods cannot be called when the component is
> > stopped.
> 
> Yep. But a Container now needs to distinguish between a Component that
> only allows start() and stop() to be run once (which imo should be
> possible),
> and a Component that allows it to happen multiple times.
> How do we do that?

I different contract warrants a different interface.  Perhaps an interface
that inherits from Executable called Unrestartable?  Something along those
lines anyway.  The interface could also merely be a merker interface called
RunOnce or something more snazzy.

You get the idea.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to