On Mon 2012-10-15 18:19, Hardy Ferentschik wrote:
> > Basically for you a Service must allow for multiple implementations
> > and a ServiceManager must offer a way to switch between various
> > implementations.
> 
> I orientate myself in this case at the ServiceLoader docs (especially since 
> we are using this mechanism as well) which says:
> "A service is a well-known set of interfaces and (usually abstract) classes. 
> A service provider is a specific implementation of a service."
> 
> What I am saying is that by calling it a ServiceManager and by using the 
> ServiceLoader API I have a certain expectation on how things 
> will work. I would have expected that each of the services has its own 
> service file and that we determine the service to use by using the 
> Service Loader API + some config code.

I don't think we use the ServiceLoader API nor implementation. though we
do reuse the pattern of finding services by a the META-INF service.

What is a bit unfortunate is that what the JDK ServiceLoader calls a
service, we call it a ServiceProvider and what they call a service
provider we call it a given implementation of ServiceProvider offering
the lifecycle management of a specific service.

In other words, the service we offer is the service provider lifecycle.
We hopped one level.
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to