-->
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.  [ 3 posts ] 
Author Message
 Post subject: Negative effects of not having a TransactionManager?
PostPosted: Wed Jul 12, 2006 9:48 am 
Beginner
Beginner

Joined: Wed Jun 21, 2006 10:08 am
Posts: 26
Currently we are running Tomcat 5.5 as a servlet container, so there is no TransactionManager. We are also using JBoss Tree Cache (localy with no clustering) for our 2nd level cache.

I understand that since we don't have a TransactionManager our level 2 cache will not be transactional with the database. I do not really understand what or how this will effect our environment since it is a local cache and not a clustered environment.

If someone could shed some light on this, that would be great. For example if there could be any negative effects...

Thanks in advance!

_________________
- Jonathan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 12, 2006 10:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Basically, you have two transactional resources particpating in the same logical transaction (the database and the cache). Without the transaction manager, it is possible for these two to become out of synch if "something goes wrong".

Say for example, you ask Hibernate to flush the dirty state of an entity. So, it needs to write an entry into the cache (for the state change) and update a row into the db. So say the put into the cache works fine and then the database operation fails. Well, now the cache has consistency issues; the next time you try to read that entity, you will get back the "updated entity" even though that updated state was not successfully written to the database.

This all assumes use of the "transactional" cache strategy...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 12, 2006 11:01 am 
Beginner
Beginner

Joined: Wed Jun 21, 2006 10:08 am
Posts: 26
Thanks for the reply.

It all makes sense now!

Do you need more points or should I save them for someone in need?

_________________
- Jonathan


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