Hibernate database connection configuration
Posted
by Alvin
on Stack Overflow
See other posts from Stack Overflow
or by Alvin
Published on 2010-03-11T00:00:22Z
Indexed on
2010/05/09
13:38 UTC
Read the original article
Hit count: 223
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.
© Stack Overflow or respective owner