[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Reading/reffering hibernate.cfg.xml file and ehcache.xlm from ouside of war file  XML
Forum Index -> Ehcache
Author Message
RajuNadi

neo

Joined: 11/28/2012 21:43:16
Messages: 2
Offline

Hi, i am using ehcache as second level cache in hibernate. I have an deployable unit .ear file in side there will be wars as well. Iam reading hibernate.cfg.xml from outside of ear file. Now everything works fine for me .Now i want to configure ehcache for the same. How can i tell the hibernate to refer ehcache.xml file from outside the ear file. placed along with hibernate.cfg.xml file. I searched net and found some configuration like below but nothing worked for me

<property name="net.sf.ehcache.configurationResourceName">/home/hibernate/ehcache.xml</property>
<property name="net.sf.ehcache.configurationResourceName">/home/hibernate/ehcache.xml</property>

I am using hinernate4.0.0, hibernate-ehcache-4.0.0.Final.jar, ehcache-core-2.4.3.jar.

can anyone help me how to refer ehcahe.xml file from hibernate.cfg.xml file both are out side ear file

thanks

Rajesh
gyan10

ophanim

Joined: 06/28/2011 23:15:25
Messages: 701
Offline

Can you try:
<property name="net.sf.ehcache.configurationResourceName" value="file:///home/hibernate/ehcache.xml" />

Hope this will help you.

Cheers!!

Gyan Awasthi
Terracotta -A Software AG company
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team