avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [excalibur] Releasing components ?
Date Mon, 19 Nov 2001 14:05:47 GMT
Vincent Massol wrote:

> The "developing with Avalon" guide suggest (strategy 1) to release
> components that we use in the release() method. It doesn't say for which
> kind of components, but I guess it only makes sense for poolable ones, right
> ? Or is there a reference count in the excalibur component manager code ?

Not JUST poolable components BTW, also Factory components.  The Components that
are created new for each request do need full lifecycle management.  That cannot
occur if the components are never released.

>     public void dispose()
>     {
>         this.manager.release(this.datasource);
>     }

ThreadSafe is the only version of the lifecycle interface that it would be
_technically_ ok, but not _contractually_ ok.  For instance, what would happen
if the implementation changed on you?  Your component would be introducing
problems for the rest of the system.  Not a good thing.  Just follow the
contracts as a general rule, and all will be well.


"Those who would trade liberty for
  temporary security deserve neither"
                 - Benjamin Franklin

To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message