On 25 janv. 2010, at 16:20, Steve Ebersole wrote:
On Mon, 2010-01-25 at 10:12 +0100, Emmanuel Bernard wrote:
> The "historical" setting repository for HEM is HibernatePersistence. Are we
deprecating it?
I don't like deprecating stuff that has not been available yet in a
non-ga release. Those fields are new to 3.5 and as such have only been
in betas so far. If you want to deprecate them feel free and schedule a
task for your self for GA to remove them.
HibernatePersistence has been hosting property names since the first version of Hibernate
EntityManager. The question is are we heeping everything together or are we creating this
new interface and copy everything to it?
> This approach probably works fine for EM but EMF's settings have to be read at
configuration time as they influence each other in a non trivial way. They are basically
part of the state machine used to retrieve the list of mappings (ann or xml), some of the
key configurations (JTA vs non JTA which influences how the datasource is provided etc).
We would need to read these setting at least two times:
> - once at Configuration time
> - once at SF creation time
Its not only about where the config comes from. Its also about
identifying which settings are supported and which are not. And yes, in
some cases it is about how to apply them (pass along in some form to SF
or just put into a local map). Because on the "flip side" it is about
reporting getProperties() properly...
> EMF#setProperty is not a contract, at least in JPA 2: we have removed it in the last
draft before running final.
> If we want to implement that as an extension, I am in favor of applying the new
settings to all the new EM being created from now on and not affect existing ones.
Ah true, I forgot that EMF config is immutable. And no, since SF config
is mostly immutable I think not supporting this is better.
--
Steve Ebersole <steve(a)hibernate.org>
Hibernate.org