-->
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: Closing cursors opened by StoredProcedureQuery
PostPosted: Wed May 11, 2016 5:00 am 
Newbie

Joined: Wed May 11, 2016 4:41 am
Posts: 1
Hello.
I'm using Hibernate 4.3.7.
When I'm calling StoredProceduredQuery multiple times in one transaction, I've received error "ORA-01000: maximum open cursors exceeded".
Apparently, each call of StoredProceduredQuery.execute opens new cursor. But to close this cursor, I need to use this code:
Code:
query.unwrap(ProcedureOutputs.class).release();

Maybe StoredProceduredQuery should have public method release for this purpose? Or maybe I'm doing something wrong?


Top
 Profile  
 
 Post subject: Re: Closing cursors opened by StoredProcedureQuery
PostPosted: Mon May 16, 2016 8:38 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1630
Location: Romania
The CallableStatement remains opened for the duration of the currently running transaction, and it gets closed when the LogicalConnectionManagedImpl object is closed.

If you are creating many StoredProceduredQuery, I guess you can run into this issue that you mentioned, in which case I agree that there should be a way to close the underlying CallableStatement.
I'm going to ask this question on our mailing list.

Thanks


Top
 Profile  
 
 Post subject: Re: Closing cursors opened by StoredProcedureQuery
PostPosted: Thu Oct 20, 2016 3:20 pm 
Newbie

Joined: Thu Oct 20, 2016 3:18 pm
Posts: 1
Hi, I have the same problemn.
Any solution?
Thks


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.