Re: [picocontainer-dev] start/stop probs mentioned a could of months ago.
peter royal <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
On Aug 10, 2007, at 8:15 AM, Paul Hammant wrote:
> Did you talk of some problems with start/stop and late added
> components - back when we started Pico 2.x?
>
> Any chance you could make a change or two to support your need -
> with test case?
so, quite behind on reading this list :)
in psuedo-code, say 'container' is the root of a container tree:
try {
container.start();
catch( Exception e ) {
container.stop();
// yeah, handle the exception
}
if start fails in a child container, its sensible to want to stop
what is already started, but that fails once it hits a container that
has not been started. i think the fix would be to allow stop() to be
called on an un-started container with no side-effects. (ie, start/
stop are each idempotent)
-pete
--
(peter.royal|osi)@pobox.com - http://fotap.org/~osi
smime.p7s
(application/pkcs7-signature, 2.4 KB) - not displayed