2

I have a web application that read an argument from tomcat -D option and decide which property file should be used. So, How can I set below property in hibernate xml? Here What I want to do:

run tomcat with -Doption=xOption

Singleton Config class load xOption.properties

<hibernate-configuration>
  <property name="hibernate.connection.url">Config.getinstance().getValue("dbUrl")</property>
</hibernate-configuration>

I get used to do it with using hibernate java config. Is there anyway to do it in xml file?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Richard
  • 335
  • 1
  • 2
  • 9

0 Answers0