How to use an external file for database configuration in EJB environment

Posted by bosnic on Stack Overflow See other posts from Stack Overflow or by bosnic
Published on 2010-04-29T20:10:14Z Indexed on 2010/04/29 20:17 UTC
Read the original article Hit count: 218

Filed under:

I need to have a file for database configuration outside of EAR file of my EJB application. Even if I define a datasource and call it via JNDI, I still have some properties that I want to change, like hibernate.dialect or hibernate.show_sql, for example. I tried using:

<property name="hibernate.ejb.cfgfile" value="some-file.xml" />

and it works fine when some-file.xml is in jar file, but how to call it from another location. I tried file:/// but didn´t work.

thanks

© Stack Overflow or respective owner

Related posts about hibernate