Hi,
I am currently facing the following problem:
I need to configure my ear for multiple environments. Therefor I used the
hibernate.properties in the root folder of the ear to configure my persistence-layer. This
works perfectly so far, because Hibernate finds the properties through itôs Environment
and loads them.
BUT:
if I now deploy another ear, holding a hibernate.properties for configuring the second
application, the hibernate.properties are simply ignored and - even more - the
hibernate.properties from the first deployment are used for my second deployment as well.
While looking in the Hibernate source code I saw that the corresponding variable is
defined as a static variable.
private static final Properties GLOBAL_PROPERTIES;
It seems as if this class will be loaded only once and the first deployment wins. I
already tried to work with isolated classloaders and set the value for
| <attribute name="Isolated">true</attribute>
|
in the ear-deployer.xml to false. But this didnÃÂôt make any difference.
Does anyone has an idea how to use multiple hibernate.properties or any other way to
handle multiple configurations for the persistence-layer?
Thanks for any input
Thomas
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203330#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...