[hibernate-dev] Usage of the Service pattern in Hibernate Search
hardy at hibernate.org
Mon Mar 23 05:33:19 EDT 2015
On Sat, Mar 21, 2015 at 10:55:58AM -0500, Steve Ebersole wrote:
> For me its a matter of consistency. Put simply a Service comes from a
> ServiceRegistry. That's consistent. This idea that some particular
> Service might come from here or there or this other place is not
> consistent. To me.
+1 This is the exactly the point I tried to make earlier as well.
> > We don't have a strategy to pick one implementation if there are
> > multiple implementations around (other than throwing an exception), so
> > having a service defined in the engine jar, essentially means noone
> > can plug an alternative, unless he overrides the
> > SearchConfiguration#getProvidedServices() method.
If we have a need for a selection strategy we should investigate how this
can be solved. We explicitly deferred it at the time, since we thought it
was not needed for now.
> > So if the intention was to allow choice, something is missing
>> If not, I'd rather load the default implementations explicitly (via their
> > traditional constructor).
Where and how would you do that?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 496 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/hibernate-dev/attachments/20150323/ea31af43/attachment.bin
More information about the hibernate-dev