RE: [picocontainer-dev] org.picocontainer.PicoCompositionException question
"Putrycz, Erik" <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Why not leave this up to the user? Just add a public function boolean isStarted in the container. Otherwise this is IMO too much assumptions on the usage. And currently there is no way to modify this behavior even by subclassing the container. Erik. ________________________________ From: Konstantin Priblouda [mailto:kpriblouda-/[email protected]] Sent: Sun 9/23/2007 7:51 AM To: dev-qxt/[email protected] Subject: Re: [picocontainer-dev] org.picocontainer.PicoCompositionException question --- "Putrycz, Erik" <[email protected]> wrote: > I have been hit by the following exception lately > > "org.picocontainer.PicoCompositionException: Cannot > remove components > after the container has started" and have been > wondering about the > rationale. If the component is not startable and its > lifecycle is not > managed, why shouldn't I be able to remove it? > > E.g > > > > _pico.addComponent(customerData); > > _pico.start(); > > ... do stuff that involves customerData > > _pico.removeComponentByInstance(customerData); > > ... do stuff that doesn't involve customerData and > allow customerData to > be gced > > ==> not possible... why? because some other lifecycle enabled component may use this? regards, ----[ Konstantin Pribluda http://www.pribluda.de <http://www.pribluda.de/> ]---------------- JTec quality components: http://www.pribluda.de/projects/ ____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
winmail.dat
(application/ms-tnef, 4.9 KB) - not displayed