Hi everybody,
I like to store the hibernate.properties in the same place as my other application configuration (xml files with mappings, pageflows, localization and so on in a central config directory) and therefore at app startup I use the setProperties() method of the Configuration class of 2.x (I use Version 2.1b4).
So far so good, but after a view test I think hibernate ignores at minimum one property setting if used this way. The property is
Code:
hibernate.cglib.use_reflection_optimizer false
The effect is as follows. If I place the properties file in the classpath hibernate finds and use it (inclusive the reflection_optimizer property!) after the call of
Code:
Configuration cfg = new Configuration();
and all works fine. If I store hibernate.properties in my config directory and run the following code
Code:
Configuraton cfg = new Configuration();
cfg.setProperties(myProp);
Hibernate writes to my log (after the first line) "hibernate.properties not found". After that I see while I debug it, that the properties are there and correct. In my case the reflection_optimizier is set to false, BUT
Code:
Environment.useReflectionOptimizer()
returns TRUE!!
This seems to me like a bug, am I right ?
THX for infos in advance.
Klaus