-->
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: Hibernate performance question when using clustered jboss
PostPosted: Mon Apr 18, 2005 2:00 pm 
Newbie

Joined: Mon Apr 18, 2005 1:56 pm
Posts: 1
Hi!

What we have:
Stateless session beans exposed as webservices on
jboss 4.0.1SP1 . We are going to deploy in a clustered
environment with high performance requirements.

The questions:
Should we use hibernate with full relational mapping
or just mapp single classes to tables without relations?

When we have full relational mapping we use lazy loading
but it feels like a lot of unnessecary work to get a whole
object just to get an ID.

Since we are going to use caching and clustering isnt
that a performance risk since the cache has to be
distributed?

Any hints, tips on performance when using webservices
and hibernate in a clustered environment...

Thanks in advance
/Per


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 2:24 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
You need to remember that if the mapped entities are truly set to be lazy, then:
Quote:
it feels like a lot of unnessecary work to get a whole
object just to get an ID

is a little misleading. What actually happens is that Hibernate generates a proxy for these entity instances; they know about their PK value, but none of the other data has been loaded from the database (until you actually try to access it). Calling myEntity.getId() *does not* force Hibernate to load the entity from the database (remember that the constructed proxy already knows about its id value).

HTH


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.