ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ORA-01000: maximum open cursors exceeded

Post new topic  Reply to topic
 ORA-01000: maximum open cursors exceeded « View previous topic :: View next topic » 
Author Message
SANTYP
PostPosted: Tue Oct 04, 2011 8:09 pm    Post subject: ORA-01000: maximum open cursors exceeded Reply with quote

Centurion

Joined: 27 Mar 2007
Posts: 142

Hi All,

In my one of the message flow... I am getting above error..

I realised that one of my class not closing resultset, stmt, and connection..
I explain the scenario why I am not closing the connections here..

I have class1 which is calling method2 of class2..
method2 returns resultset..

I am using method2's resultset contents in class1's main method.

If I close the connection, resultset, and stmt in method2, ican't use the contents of result in class1..

can any one suggest best way to close method2's objects.??

I tried in diff ways...
one them was..

in my method2 i declared resultset, statement and connection as static variables.. and also written one more method in class2 called finalize() in which i am closing the above objects..
and in class1 in finally block I am calling System.gc();

will this close those objects ..? I mean stmt, rs and conn?
not sure whether this way will close those objects or not..

please suggest ...
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Oct 05, 2011 4:40 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

First off, post a picture so we can see you.

Second, you might like to try caching the results of the first step, closing the cursor, then executing the second step.

For caching mechanisms, you might look at solidDB, Singletons, or the LocalEnvironment.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Oct 05, 2011 4:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You also don't, in general, seem to have a good handle on the lifecycle of the JavaCompute node class.

So you should spend some time reviewing the Message Broker Documentation so that you better understand how Java works *within* Message Broker.

This will, among other things, help you avoid treating Message Broker like it was a JEE App Server.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed Oct 05, 2011 5:03 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

i did it in a different way.


select the output and stored in temp Out Message, and returned this back and cleared it once it done.

so you can close your connection as well in this case.
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Oct 05, 2011 5:41 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Gaya3 wrote:
i did it in a different way.


select the output and stored in temp Out Message, and returned this back and cleared it once it done.

so you can close your connection as well in this case.


This way also works, however, the latency penalty for using I/O is greater than for using cache memory.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
SANTYP
PostPosted: Wed Oct 05, 2011 5:54 pm    Post subject: Reply with quote

Centurion

Joined: 27 Mar 2007
Posts: 142

Thanks for your input guys... specially Gaya3 Thanks a lot.. I will try ur suggestion...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ORA-01000: maximum open cursors exceeded
Jump to:  



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
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.