-->
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.  [ 1 post ] 
Author Message
 Post subject: Architecture with Hibernate question
PostPosted: Thu Apr 14, 2005 3:12 am 
Newbie

Joined: Wed Jan 21, 2004 5:09 am
Posts: 11
Hi all.

I tested Hibernate cache and it works very well.
My problem is that 2 sessions will not return 2 objects wich are the same instance (do not compare correctly with ==).
I know this is a feature, not a bug and I understand why it is this way.

But my problem is :

Objects have properties that are mapped in the SGDB and properties that are not.
Properties that are not are calculated. For example, there may be a field with html that is parsed and affected to calculated properties.

The point I wan't to came is that, even if DB acces are cached, those fields are calculated for each sessions.

This happen, of course, on objects that should be shared between sessions and where there is no need for transactions. They might be modified and saved, but the state should be replicated immediately everywhere across the jvm. This can be do only if there is *only one* instance shared.

So, is there a way/pattern/technique to handle those objects with hibernate ?
Actually I use a cache over Hibernate but it complicate design.

This problem must have a solution somewhere because it is a common problem on editorial web sites that are 95% read-only.

Thanks in advance for any advice.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.