-->
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.  [ 4 posts ] 
Author Message
 Post subject: Using hibernate with an application server
PostPosted: Wed Jan 18, 2006 11:34 am 
Newbie

Joined: Fri Nov 18, 2005 11:57 am
Posts: 6
Hi,

As I understand it, hibernate caches all data. But if there are millions of records in the database, then at some point one server won't be able to handle all of that data in memory. So what to do?

Use an application server like JBoss, to "share the cache"? I was told by someone that I couldn't do this with hibernate.

But to me that doesn't make sense because hibernate is supposed to be part of a lightweight j2ee solution. What is an "enterprise" without an applicatoin server?

Can someone set me straight? How would I use multiple servers to share the hibernate load...?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 12:51 pm 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
Caching does not mean that all data from the database is loaded. A cache will probalby hold the data you loaded for your application. You can define the size of a cache. See the EHCache configuration for example.
Hibernate will only load some million rows if you do want to access them at the same time. Even then the cache size has its limits. You will probably have to page through your data.

Try out cache and reading large list of data and paging to get some experience with this.

Regards Sebastian

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 11:16 am 
Newbie

Joined: Fri Nov 18, 2005 11:57 am
Posts: 6
Thanks for the reply. I'm still trying to determine:

How would I use multiple servers to share the hibernate load...? Can hibernate be used in an application server to achieve this?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 12:36 pm 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
I think you can use OSCache. It has the feature to add an Multicast Address, on which the Servers can listen.


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