[hibernate-dev] HHH-5562, services and eventlisteners

Steve Ebersole steve at hibernate.org
Wed Feb 16 14:12:50 EST 2011


Should we enforce a ServiceRegistry-to-SessionFactory model?

Or, should a single ServiceRegistry be usable in multiple SessionFactorys?

On Wednesday, February 09, 2011, at 09:30 am, Steve Ebersole wrote:
> I agree.
> 
> On Wednesday, February 09, 2011, at 01:21 am, Max Rydahl Andersen wrote:
> > On Feb 9, 2011, at 07:55, Adam Warski wrote:
> > > Do you have in mind the process of discovery (that services would also
> > > be discovered via META-INF/services, like event listeners), or that
> > > the event listener registry should just be another Hibernate service?
> > 
> > If that happens I hope we will have a way to explicitly control it per
> > sessionfactory since not every sessionfactory would like every service
> > enable as available from the global classpath.
> > 
> > i.e. today from tools we explicitly disable search and validator to avoid
> > classloading conflicts and other funky sideeffects when running code
> > generation or prototype queries.
> > 
> > /max
> > 
> > > Adam
> > > 
> > > On Feb 8, 2011, at 6:49 PM, Steve Ebersole wrote:
> > >> http://opensource.atlassian.com/projects/hibernate/browse/HHH-5562
> > >> discusses applying the principle of a "service locator pattern" to
> > >> event listener registration from integrators.  There has also been
> > >> discussions about applying the same principles to services as they
> > >> will be defined in Hibernate 4[1]. Personally I am leaning towards
> > >> combining these into a single mechanism where the LocatedThing could
> > >> do either (or both).  Looking to see if anyone has specific use cases
> > >> where that will not work, requiring the split.
> > >> 
> > >> 
> > >> [1]
> > >> https://sourceforge.net/apps/mediawiki/hibernate/index.php?title=Categ
> > >> or y:Services
> > >> 
> > >> 
> > >> ---
> > >> Steve Ebersole <steve at hibernate.org>
> > >> http://hibernate.org
> > >> _______________________________________________
> > >> hibernate-dev mailing list
> > >> hibernate-dev at lists.jboss.org
> > >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> 
> ---
> Steve Ebersole <steve at hibernate.org>
> http://hibernate.org

---
Steve Ebersole <steve at hibernate.org>
http://hibernate.org



More information about the hibernate-dev mailing list