Hibernate version:
3.3.1.GA
Hi,
I am currently facing the following problems.
I am running multiple Hibernate-based applications on one application server. As I have multiple different environments for my application (such as integration, live, etc) I am using the hibernate.properties to configure hibernate properties, so that I keep one single jar together with different DB-settings.
So far so good.
But now I want to run a second Hibernate-based application on that server, which also holds it´s own hibernate.properties for it´s configuration. But the problem is, that this file now is completely ignored and furthermore the hibernate.properties from the first application is used as well.
When looking into the source code of the Environment-Class the reason becomes obvious as the accordant variable is declared as static:
Code:
private static final Properties GLOBAL_PROPERTIES;
As far as I can see this class will only be called once, so the second application does not start an own instance of the Environment itself, but uses the existing one.
Is there any chance to define hibernate.properties for each application independantly?
Any input is greatly appriciated...
Thomas