Re: [hibernate-dev] Integrator locator

2011-04-04 Thread Steve Ebersole
So a slight concern. The javadocs for java.util.ServiceLoader state that its load(Class) method uses TCCL. Given the recent issues we have had with TCCL and JBoss AS 7 I wonder if its better to use the explicit load(Class,ClassLoader) version? There the question becomes what ClassLoader to us

Re: [hibernate-dev] Integrator locator

2011-04-04 Thread Max Rydahl Andersen
> We can do it either way. Of the ones I converted to using Integrators, > search > and envers both have "skip" settings defined. > > search: hibernate.search.autoregister_listeners > envers: hibernate.listeners.envers.autoRegister > (should really standardize these names) Individual "skippin

Re: [hibernate-dev] Integrator locator

2011-04-01 Thread Steve Ebersole
We can do it either way. Of the ones I converted to using Integrators, search and envers both have "skip" settings defined. search: hibernate.search.autoregister_listeners envers: hibernate.listeners.envers.autoRegister (should really standardize these names) I guess it really depends on the in

Re: [hibernate-dev] Integrator locator

2011-03-31 Thread Emmanuel Bernard
There is one for search too. But should we have a global flag to disable all integrations? Does it makes sense (what about Bean Validation for example? On 31 mars 2011, at 20:08, Adam Warski wrote: > > On Mar 31, 2011, at 12:05 PM, Max Rydahl Andersen wrote: > >> btw. any way to disable speci

Re: [hibernate-dev] Integrator locator

2011-03-31 Thread Adam Warski
On Mar 31, 2011, at 12:05 PM, Max Rydahl Andersen wrote: > btw. any way to disable specific discovery items ? > i.e. I would like to not have search and envers enabled when the tools are > doing query plans/executions > since it then suddenly requires much more configuration to have it setup an

Re: [hibernate-dev] Integrator locator

2011-03-31 Thread Max Rydahl Andersen
btw. any way to disable specific discovery items ? i.e. I would like to not have search and envers enabled when the tools are doing query plans/executions since it then suddenly requires much more configuration to have it setup and run. /max On Mar 31, 2011, at 12:00, Max Rydahl Andersen wrote

Re: [hibernate-dev] Integrator locator

2011-03-31 Thread Max Rydahl Andersen
Any thinking done on how CDI enabled applications could be using CDI to wire this up ? /max On Mar 27, 2011, at 19:27, Steve Ebersole wrote: > HHH-5562 is done, which introduces a locator/discovery means for integrating > with Hibernate. Specifically it introduces the (alternate name suggesti

Re: [hibernate-dev] Integrator locator

2011-03-31 Thread Adam Warski
On Mar 30, 2011, at 8:46 PM, Steve Ebersole wrote: > To be honest not sure what this really buys you. Basically you have to > follow > the META-INF/service/{intf-name} pattern for naming your locator file and > that > locator file, as far as I know, can only have a single entry naming the im

Re: [hibernate-dev] Integrator locator

2011-03-30 Thread Steve Ebersole
What I mean is this... Lets say we want to allow users to plug in a ConnectionProvider by this method. How do they get configuration information into this service? Thats why our file is slightly different, you have key/value pairs allowed. The required key is implClass to name your impl. Bu

Re: [hibernate-dev] Integrator locator

2011-03-30 Thread Gunnar Morling
Each provider configuration file can contain multiple implementations of the given interface. From the JavaDoc of j.u.ServiceLoader: "The file contains a list of fully-qualified binary names of concrete provider classes, one per line". >From how I understood your original requirement/implementatio

Re: [hibernate-dev] Integrator locator

2011-03-30 Thread Steve Ebersole
To be honest not sure what this really buys you. Basically you have to follow the META-INF/service/{intf-name} pattern for naming your locator file and that locator file, as far as I know, can only have a single entry naming the impl class. Which is kind of limiting. What concrete benefits do

Re: [hibernate-dev] Integrator locator

2011-03-30 Thread Adam Warski
Even better then :) Adam On Mar 30, 2011, at 8:23 PM, Steve Ebersole wrote: > Hibernate 4 targets java 6 > > On Wednesday, March 30, 2011, at 01:16 pm, Adam Warski wrote: >> Heh sorry, pasted the wrong link :) This should be the right one: >> http://java.sun.com/developer/technicalArticles/java

Re: [hibernate-dev] Integrator locator

2011-03-30 Thread Steve Ebersole
Hibernate 4 targets java 6 On Wednesday, March 30, 2011, at 01:16 pm, Adam Warski wrote: > Heh sorry, pasted the wrong link :) This should be the right one: > http://java.sun.com/developer/technicalArticles/javase/extensible/index.htm > l > > Anyway, the mechanism/names were standardized as part

Re: [hibernate-dev] Integrator locator

2011-03-30 Thread Adam Warski
Heh sorry, pasted the wrong link :) This should be the right one: http://java.sun.com/developer/technicalArticles/javase/extensible/index.html Anyway, the mechanism/names were standardized as part of Java 6. That's e.g. how CDI extensions are discovered: http://docs.jboss.org/weld/reference/1.1.

Re: [hibernate-dev] Integrator locator

2011-03-30 Thread Gunnar Morling
Hi, since Java 1.6 this functionality is provided by java.util.ServiceLoader [1] so when you are based on JDK 6 anyway you could simply use that class. When targeting older JDKs one indeed must build it from hand (HV does this for instance, too). Sun's JDK has contained this utility for quite a w

Re: [hibernate-dev] Integrator locator

2011-03-30 Thread Steve Ebersole
This is exactly what I have done. There is no standard java mechanism for doing this. Your link simply shows how one piece of java (Sound API) does it. On Wednesday, March 30, 2011, at 11:22 am, Adam Warski wrote: > Did you think about using the java services mechanism? Essentialy placing a >

Re: [hibernate-dev] Integrator locator

2011-03-30 Thread Adam Warski
Did you think about using the java services mechanism? Essentialy placing a file in META-INF/services: http://download.oracle.com/javase/1.4.2/docs/guide/sound/programmer_guide/chapter13.html ? I don't think it gives any functionality, but is a standard way for doing such things. Adam On Mar 2

Re: [hibernate-dev] Integrator locator

2011-03-27 Thread Steve Ebersole
Btw, org.hibernate.cfg.search.HibernateSearchEventListenerRegister is deprecated saying that "as of release 3.4.0.CR2, replaced by Hibernate Search's {@link org.hibernate.search.cfg.EventListenerRegister#enableHibernateSearch(EventListeners, Properties)}". Just be aware that that signature wi