> From: Berin Loritsch [mailto:[EMAIL PROTECTED]]
>
> Between your's and Leo's comments, I believe we came full circle
> and established
> that the contracts we have now are adequate. We have not
> resolved whether the
> Component interface can be gotten rid of, and for the reasons of
> the confusion
> of what a Component is, I think it would be detrimental to remove it.
I am +1 on this. As the interface does not have a contract attached to it
in the same way as the other methodless marker interfaces, I see
no reason for it nor against it from an architectural POV, but as you
say, it helps emphasize that a component isn't just any object.
> The only grievance I have is that Recyclable is in a different
> package than
> ThreadSafe and SingleThreaded.
True. It, and Poolable, should be in framework.
I consider framework to be the core of Avalon, with Excalibur
being the default implementations of the contracts set forth in
framework.
By putting Poolable/Recyclabe in Excalibur, we get components
that only works optimally with one implementation of Avalon.
Now, I can accept that, for example, we may have a
org.apache.xp.SupportsWindowsXPTweaks interface to
mark components that can be made to work much better in XP,
but something as fundamental as SingleThreaded/ThreadSafe/Poolable
should be in framework.
Transactional handling of components:
-------------------------------------
This was quite interesting.
Having a
Component lookup (Object token, String role);
releaseAll (Object token);
in addition to the existing methods in ComponentManager would be
cool. I see the tokens much like one would use synchronization
objects - suppose my component keeps some components for its
whole lifetime, and some just on a per-request basis:
public class MyComponent {
private final Object lifetimeToken = new Object ();
...
private LifetimeComponent lcCom = null;
...
public void compose (ComponentManager manager) throws ComponentException {
lcCom = manager.lookup (lifetimeToken, LifetimeComponent.ROLE);
}
public void handleRequest (Request req) {
RequestComponent rqCom = null;
try {
rqCom = manager.lookup (req, RequestComponent.ROLE);
...
} catch (Exception e) {
} finally {
manager.releaseAll (req);
}
}
public void dispose () {
manager.releaseAll (lifetimeToken);
}
}
/LS
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>