Re: [hibernate-dev] Building a SessionFactory

2011-04-27 Thread Steve Ebersole
things >> straight. >> >> - Original Message - >> From: "Steve Ebersole" >> To: "Emmanuel Bernard" >> Cc: hibernate-dev@lists.jboss.org >> Sent: Tuesday, April 26, 2011 11:47:12 AM >> Subject: Re: [hibernate-d

Re: [hibernate-dev] Building a SessionFactory

2011-04-27 Thread Emmanuel Bernard
dev@lists.jboss.org > Sent: Tuesday, April 26, 2011 11:47:12 AM > Subject: Re: [hibernate-dev] Building a SessionFactory > > John just pointed out a type here that caused everyone some confusion. > I apologize. > > MetadataSources sources = new MetadataSources(...) > .

Re: [hibernate-dev] Building a SessionFactory

2011-04-26 Thread Gail Badner
"Steve Ebersole" To: "Emmanuel Bernard" Cc: hibernate-dev@lists.jboss.org Sent: Tuesday, April 26, 2011 11:47:12 AM Subject: Re: [hibernate-dev] Building a SessionFactory John just pointed out a type here that caused everyone some confusion. I apologize. Metad

Re: [hibernate-dev] Building a SessionFactory

2011-04-26 Thread Steve Ebersole
John just pointed out a type here that caused everyone some confusion. I apologize. MetadataSources sources = new MetadataSources(...) ... .getMetadataBuilder() .setNamingStrategy( ... ) .buildMetadata(); should really read: Metadata metadata = new MetadataSo

Re: [hibernate-dev] Building a SessionFactory

2011-04-26 Thread Steve Ebersole
Builder is a generic term. The specific function served here is that of a set of sources for metadata. The same does not hold for ServiceRegistryBuilder. It does not hold a singular type of information. In fact initially I shied away from the name ServiceRegistryBuilder because of its generi

Re: [hibernate-dev] Building a SessionFactory

2011-04-26 Thread Emmanuel Bernard
I think we can converge by using the following approach. https://gist.github.com/942450 Check the meeting logs, we have discussed the idea further. BTW it occurred to me that MetadataSources is more a builder than anything else, should it be renamed to align with the service registry approach?

Re: [hibernate-dev] Building a SessionFactory

2011-04-22 Thread Steve Ebersole
I do not disagree, especially about the clutter. I had two related concerns with that this approach though: 1) minor, but this thing is then no longer just collecting the sources of metadata which is what a MetadataSources is. 2) this is no longer a "directed API" at all. What do I mean by that

Re: [hibernate-dev] Building a SessionFactory

2011-04-22 Thread Emmanuel Bernard
My preference would go to a MetadataSources#setMetadata(NamingStrategy) My fear is that more functions could be needed overtime and make the constructor or the buildMetadata signature cluttered and less readable. On 21 avr. 2011, at 15:08, Steve Ebersole wrote: > NamingStrategy is not a servi

Re: [hibernate-dev] Building a SessionFactory

2011-04-21 Thread Steve Ebersole
NamingStrategy is not a service. It is solely a function of building the metadata. Currently, again, I have this set up via ctor param passing: new MetadataSources( reg, new MyNamingStrategy() ) Really its not logically part of the source, its needed during the transition from source->metadat

Re: [hibernate-dev] Building a SessionFactory

2011-04-21 Thread Emmanuel Bernard
On 21 avr. 2011, at 05:43, Steve Ebersole wrote: > I think this new API for creating a SessionFactory is starting to firm > up, so I wanted to put out another call for feedback before we get too > close to Alpha3. So at a high level there are 2 pieces of information > needed to build the Sess

[hibernate-dev] Building a SessionFactory

2011-04-20 Thread Steve Ebersole
I think this new API for creating a SessionFactory is starting to firm up, so I wanted to put out another call for feedback before we get too close to Alpha3. So at a high level there are 2 pieces of information needed to build the SessionFactory: the ServiceRegistry and the Metadata.