-->
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: Best way to deal with ext. updates when using extended ctx?
PostPosted: Fri Aug 15, 2008 1:07 am 
Regular
Regular

Joined: Fri Oct 05, 2007 3:22 am
Posts: 69
What is the best way to deal with a situation where the application is using an extended persistent context but yet there are several writes by an external process?

When a transaction completes the documentation says that an extended persistent context becomes detached from the db and reattached during the next unit of work.

When the persistent context is reattached a merge occurs on all elements in the extended persistent context does it not?

What happens if you are using an L2 cache?

Since Hibernate has no way of knowing if an external source has updated the database what is the best way to deal with maintaining data integrity?

I'm not sure of any way of really dealing with this scenario without select for update but doing so across a long running conversation will not do.

Optimistic locking is not possible since the schema is defined and there is no way to add a column for versioning

Any advice?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 15, 2008 3:25 am 
Expert
Expert

Joined: Thu Jul 05, 2007 9:38 am
Posts: 287
Quote:
Optimistic locking is not possible since the schema is defined and there is no way to add a column for versioning


You still can do optimistic locking by comparing all columns.

On the other points ... no idea, but I'curious as well :-)

_________________
Please rate useful posts.


Schauderhaft: Softwaredevelopment, Projectmanagement, Qualitymanagement and all things "schauderhaft"


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.