-->
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.  [ 6 posts ] 
Author Message
 Post subject: Creating cache elements with Middlegen
PostPosted: Wed Aug 18, 2004 5:04 am 
Newbie

Joined: Thu Apr 01, 2004 12:06 pm
Posts: 12
Location: Hamburg (Germany)
Hi,

I've searched the forum and the documentation, but I haven't found out how to generate cacheing elements in the mapping files with Middlegen.
Does anyone know how to to this?

Thanx
Christoph


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 5:09 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Never use random caching! Also, use the <class-cache> and <collection-cache> elements in hibernate.cfg.xml, much more convenient for tuning.

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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 5:13 am 
Newbie

Joined: Thu Apr 01, 2004 12:06 pm
Posts: 12
Location: Hamburg (Germany)
Thanx for the quick reply.

I'm not quite sure what you mean by random caching.

This is how it is described to enable caching for persitent classes:
(http://www.hibernate.org/158.html)

"To enable caching, add the following element.

<cache usage="read-write | read-only | |" /> "

I'm trying out how to do this with middlegen.

You are telling me to enable the cache centrally in the hibernate.cfg.xml, right?
Can you pint me to more documentation how to do this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 5:16 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Please read the reference documentation first, I was refering to 14.3.1.

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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 6:15 am 
Newbie

Joined: Thu Apr 01, 2004 12:06 pm
Posts: 12
Location: Hamburg (Germany)
Thanks again.

There isn't much documentation about the class-cache element besides that there IS an class-cache element that can be used,but I've been able to configure it by reading the DTD:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 19, 2004 7:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Christian has suggested the best option - having said that I will consider adding a caching option to Middlegen.


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