开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜