> From: Berin Loritsch [mailto:[EMAIL PROTECTED]]
>
> ServiceLocator (XXXXLocator): 3 (Me, Leo Sutic, Stephen McConnel)
Can someone to a newbie check on "You get your *Components* from
the *Service*Locator"?
I was against ServiceLocator not because I didn't see Components
as being/providing a service, but if we are talking about
Components, then we should apply that name throughout.
I really dislike the shift in terminology we have here...
A4 was about components, period. They could be pooled, singlethreaded,
etc., and they existed inside a container. A5 components are all
threadsafe (remember, "the thing you get out of the ComponentManager is
threadsafe"). They can be pooled, but if you do that then you are
getting a "processing artifact" or whatever...
The above does not make any sense whatsoever. Please rearrange and
replace
words until it does - but here's the point:
It seems like in A5 we have this, for what in A4 was pooled components:
Use a [Component/Service][Locator/Directory] to get a ??????????. Do
this
in compose().
Use the ?????????? to get the Component (as you knew it).
The ????????? was called XXXXXManager or "factory" in our previous
discussion.
So really, we're not about COP anymore - it is more of a
Service-oriented
programming style we're going for. You use the ServiceLocator to get a
Component factory service, but the Component is only seen as a
by-product
of it all.
Furthermore, since pooling etc. was handler by the manager in A4 and
explicitly by the component in A5, A5 is more about services. We really
only focus on service-oriented stuff, and not much on those little
black boxes we called components.
------------------------------------------------------------
Can we standardize on the ??????????? interface for
pooled/singlethreaded
components? Then I can say:
Use the ComponentLocator to get the ComponentManager.
Use the ComponentManager to get the Component.
Once you are done, put the Component back into the ComponentManager.
interface ComponentLocator {
public Object lookup ();
}
interface ComponentManager {
public Object getInstance ();
public void release (Object o);
}
I think this is in line with EJB (XXXHome interface) but with an
explicit release(), as we have not found some kind of release()
unneccesary.
/LS
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>