-->
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.  [ 5 posts ] 
Author Message
 Post subject: Toplink vs. Hibernate thread on OTN
PostPosted: Mon Mar 07, 2005 11:34 pm 
Newbie

Joined: Fri Oct 31, 2003 3:33 pm
Posts: 17
Location: California
Somebody with a little more Hibernate expertise may want to jump in over here...

http://forums.oracle.com/forums/thread. ... msRange=15

-nick


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 08, 2005 12:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Heehee, the Ken Auer guy is amazing. He went and completely bastardized Hibernate 'cos he decided he needed process-scoped identity. Then he blames us 'cos his bastardized Hibernate doesn't work.

All the docs for Hibernate assume that you are working in a multi-user system, where process scoped identity is an absolute no-no - you would require synchronization on entity instances, which is guaranteed to result in deadlocks, since there is no possible "natural" order in which to obtain locks. Some persistence solutions (eg. EJB 2.1 commit option A) try to get around this by integrating the locking process with JTA, and allowing the transaction timeout to resolve deadlocks. It should be obvious why this is a terrible solution ;-)

However, in a single-user system - eg a Swing app - there is an incredibly simple solution if you feel you really need process-scoped identity: just use a process-scoped session! I know of some people who are doing this very successfully. I guess we need to properly document this pattern, it's one of those things that we never paid much attention too, given that we target high-concurrency applications so heavily.

But anyway, love that rant, full of so many wrong assumptions it's truly special. "Hibernate advertises itself as a framework"? Where, on our entire website, do we say Hibernate is a "framework"??

:-)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 08, 2005 1:12 am 
Newbie

Joined: Fri Oct 31, 2003 3:33 pm
Posts: 17
Location: California
lol. yeah that guy is way out of line. After I flamed him, my co-worker noticed he has Ken's "Extreme Programming Applied: Playing to Win" book on his bookshelf! Small world, I guess.

Anyways, thanks for clarifying the issue here... It seemed like he wasn't using Hibernate the "right way", but I didn't really have enough experience with all the different ORM tools (like EJB 2, Toplink) to reply intelligently ;) Thanks for clearing things up, Gavin. Feel free to post a reply on OTN if you feel its worth your time.


Top
 Profile  
 
 Post subject: Re: Toplink vs. Hibernate thread on OTN
PostPosted: Mon Jul 15, 2013 5:34 am 
Newbie

Joined: Mon Jul 15, 2013 5:28 am
Posts: 1
Hi, @gavin, I have very little experience with nHibernate, could you please provide more information why
Quote:
where process scoped identity is an absolute no-no
and maybe patterns on how to approach to change an application that relies on it?


Top
 Profile  
 
 Post subject: Re: Toplink vs. Hibernate thread on OTN
PostPosted: Mon Jul 22, 2013 6:11 am 
Newbie

Joined: Mon Jul 22, 2013 5:47 am
Posts: 1
Nice surprise about this shorter form. Can you tell us what it is you are talking/writing about?Has any info. about this shorter form been posted before (and i just missed it)?

_________________
David


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