-->
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: Clustered cache + TX management
PostPosted: Mon May 10, 2004 7:59 am 
Newbie

Joined: Mon May 10, 2004 7:44 am
Posts: 2
I'm developing a hibernate based clustered J2EE application and have two major questions:
1. I need to use a clustered cache, and saw that there various options (OSCache, SwarmCache, TreeCache, etc.). Does anyone have info/experience on how they compare in terms of performance, data integrity, ease of use, etc?
2. I didn't quite understand from the documentation how hibernate works together with CMT JTA transactions in a J2EE environment. Can someone please elaborate on this?

Any help would be greatly appriciated


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 10, 2004 11:36 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
2.
When the JTA Transaction factory is used: session.beginTransaction() try to find a Tx in the appropriate context and use it ; if no tx is found, Hibernate will create one and put it in the context.

If you don't use session.beginTransaction() or second level cache, just let hibernate use a datasource and the tx lifecycle will be managed by the container.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Cache replication
PostPosted: Tue May 11, 2004 11:38 am 
Newbie

Joined: Mon May 10, 2004 7:44 am
Posts: 2
Thanks for the prompt answer Emmanuel.
I have another question regarding cache replication:
Am I correct assuming that for clustered 2nd level cache, objects are replicated entirely using java serialization?
For example, if I have a POJO with 5 properties, and I only update one of them, will the entire object be serialized and sent to other nodes in the cluster, or is Hibernate smart enough to replicate only the modified property?
Help would be appriciated


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 11, 2004 11:42 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
First, this is the job of the second-level cache provider, not Hibernate. If you are using JBossCache (with the TreeCache backend), the subgraph will be fully replicated. If you are using the TreeCacheAOP backend, you get fine-grained replication. This stuff is however in its early stages (I doubt anyone can provide that functionality right now).

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


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.