[hibernate-dev] EMF / EM properties
Steve Ebersole
steve at hibernate.org
Mon Jan 25 10:20:53 EST 2010
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.
> 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 at hibernate.org>
Hibernate.org
More information about the hibernate-dev
mailing list