Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: (ehcache.xml) under a different file name
PostPosted: Tue Mar 27, 2007 7:06 pm 
Newbie

Joined: Mon Mar 12, 2007 2:47 pm
Posts: 11
Hibernate version: 3.2.0

Ehcache version: 1.2.4

I'm trying to integrate ehcache into my application and having problems with the cache manager reading the ehcache.xml file definition if it is under a different name (currently our VM has already an instance of another cache definition loaded under a legacy webapplication using the file ehcache.xml). What my other application is trying to do is basically load up ehcache-hibernate.xml for example.

I've added the definition into my hibernate.cfg.xml file

Code:
<property name="net.sf.ehcache.configurationResourceName">ehcache-hibernate.xml</property>


but seems like hibernate isn't picking up that definition file. I've tested it if the file has the default name ehcache.xml, however if i change the file to another different name (ehcache-hibernate.xml) in this example, it's not picking it up. Is this the correct way to specify the loading of a EHCache configuration file if it's gonna be a name other than the expected default? Any help would be greatly appreciated. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 28, 2007 12:18 am 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
Hi flyboy604,


have a reference
http://www.hibernate.org/hib_docs/v3/ap ... vider.html

_________________
Dharmendra Pandey


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 28, 2007 2:42 am 
Newbie

Joined: Sat Mar 24, 2007 8:14 am
Posts: 15
jst copy and paste this line to ur hibernate.cfg.xml file

<property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>

and add ehcache*.jar file to ur project.

i think it helps u to resolve ur problem.

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.