-->
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: Best way to cache an already-existing object?
PostPosted: Mon Jul 16, 2007 12:08 pm 
Newbie

Joined: Mon Jul 16, 2007 11:30 am
Posts: 1
Hello,

I'm using Hibernate 3.0.5 and I am trying to re-use as much code as I can from already-existing software that uses the same database. I simply jarred up the existing tool and am using it as a library.

For this new tool, I'm using Hibernate's first-level caching. The existing tool uses Hibernate as well, but in a more complicated way.

There are some objects that the existing tool retrieves using jdbcTemplate. I would like to reuse this, but then cache these objects at the session level. Is there a way to do this with Hibernate? Can I somehow add it to the cache?

Any opinions on the best approach would be much appreciated. This is my first Hibernate project, and I did look for information on how to do this, but haven't found any.


Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2007 5:11 pm 
Beginner
Beginner

Joined: Mon May 21, 2007 5:22 pm
Posts: 27
Location: Salt Lake City
Hey,

Try to use the second level cache, Ehcache is a good option.

_________________
Try 'N' Enjoy !!
Rahul

If helpful do rating ....


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.