-------- Original Message --------
Subject: Proposed addition to ComponentManager/Selector
Date: Wed, 21 Feb 2001 09:07:33 -0500
From: Berin Loritsch <[EMAIL PROTECTED]>
Reply-To: "Avalon Development" <[email protected]>
To: "[email protected]" <[email protected]>

One thing we have identified at the Cocoon porject is the
need to hide the implementation facts of whether a Component
is ThreadSafe, Poolable, Factory, etc.

To date, in order to do that we have had to come up with an
inelegant Hack.

The truly elegant and IMO correct way of doing things is to
add a put() or return(Component) method so that every used
Component has a definite beginning and ending.  It is a standard
contract for all Composers to lookup and return components,
that way the implementation details can be absolutely hidden
from the end client of the Component.

interface ComponentManager {
    Component lookup (String role);
    void return (Component usedComponent);
}

interface ComponentSelector implements Component {
    Component select (Object hint);
    void return (Component usedComponent);
}

This request comes from _hard_ _use_ of the ComponentManager
system, and I think reflects a natural evolution that we
should use.

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

Reply via email to