开发者

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

开发者 https://www.devze.com 2022-12-28 20:59 出处:网络
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

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:

开发者_如何学C<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


Try with /some-file.xml and put your some-file.xml on the classpath.

0

精彩评论

暂无评论...
验证码 换一张
取 消