Hibernate database connection configuration
- by Alvin
We have 2 different server environments using the same Hibernate configuration. One server has JNDI support for datasource, but the other does not. Currently the Hibernate configuration is configured to use JNDI, which is causing problem on the server that does not support JNDI.
I have also tried to put the direct JDBC configuration together with JNDI configuration into the configuration file, but it looks like hibernate always favors JNDI over direct JDBC configuration if both exist.
My question is, will it be the same if both JNDI and connection_provider configuration both exists? Will Hibernate still use JNDI over connection_provider? Or is there any way to change the precedence of the database connection property?
I do not have access to the server all the time, so I thought I do ask the question before my window of the sever time.
Thanks in advance.