-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: EHCache and hibernate.cfg.xml
PostPosted: Wed Apr 28, 2004 1:08 pm 
Newbie

Joined: Wed Nov 12, 2003 4:57 pm
Posts: 14
Location: New York City
I am upgrading to hibernate 2.1.3 from 2.0.1 and upgrading from jcs to ehcache.

In section 14.3 of the documentation, the following line is present:

Alternatively (preferrably?), you may specify <class-cache> and <collection-cache> elements in hibernate.cfg.xml.

This is great except that in section 1.1, in the example hibernate.cfg.xml, here is the header for the xml file:

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

The hibernate-configuration-2.0.dtd does not allow the <class-cache> or <collection-cache> elements. I know that I can put a <cache> element in each of my .hbm.xml mapping files but I prefer putting the cache statements in the hibernate.cfg.xml. Will Hibernate still perform correctly using the old <jcs-cache> and <jcs-collection-cache> elements from hibernate 2.0 while using ehcache as the cache provider? Is this a bug? Am I missing something?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 28, 2004 1:12 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Use the DTD distributed with Hibernate, the PUBLIC DTD is not up to date...

Your XML parser will actually find the DTD in the hibernate2.jar before looking it up on the web.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.