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: Evict object with uninitialized proxy from session issue
PostPosted: Thu Nov 30, 2006 12:54 pm 
Beginner
Beginner

Joined: Sat Apr 17, 2004 1:11 am
Posts: 36
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

1.0.1

Has the issue at the following link been ported to NH? I ask because it states in the issue that the fix was only going to be applied to 3.x and this is biting me in the tush.

http://opensource.atlassian.com/project ... ge=history

I have an object with an uninitialized proxy that I want to do the following to:

Code:
ISession s1 = ...
ISession s2 = ...

object o1 = s1.Load(1);
s1.Evict(o1);
s2.Lock(o1);


I get the dreaded 'attempt to associate proxy with two open sessions' exception as detailed in the included link. I've looked at the code and it appears that the proxies are reused between object instances so I see maybe why the __interceptor field on the proxy would not have the Session cleared on it on a detach. However, this must have been fixed in this issue so something must have changed there.

I looked at the release notes for 1.0.2 and 1.0.3 and didn't see anything related to this - although I did see an issue regarding attachment of an entity to a session causing it to be unnecessarily initialized (which is another issue that is probably going to make me upgrade to 1.0.3 - I know, I know...). If this is fixed in a later 1.0.X or 1.2 release then I will just have to upgrade but I've searched JIRA and haven't found confirmation of this.

Thx for any help or pointers in the right direction...

benster


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 05, 2006 9:05 am 
Beginner
Beginner

Joined: Sat Apr 17, 2004 1:11 am
Posts: 36
I've upgrade to 1.0.3 and the issue still remains. Does anyone have any info on this?? This is a bug to me - the code I presented is a very, very simple case but it manifests itself in other ways. But basically I can't move objects between ISessions if an uninitialized proxy exists on the object. This is NOT the behavior with an uninitialized collection as those work fine on an evict/lock.

I am at a standstill optimization-wise without being able to setup some of my MTO relationships as lazy. I just need to know that this is a bug and I can look at what it would take to fix it maybe.

Thx,

benster


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 13, 2006 2:54 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Yes, this is probably a bug, please report it with a test case.


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.