|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ORA-01000: maximum open cursors exceeded |
« View previous topic :: View next topic » |
Author |
Message
|
SANTYP |
Posted: Tue Oct 04, 2011 8:09 pm Post subject: ORA-01000: maximum open cursors exceeded |
|
|
 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 |
|
 |
lancelotlinc |
Posted: Wed Oct 05, 2011 4:40 am Post subject: |
|
|
 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 |
|
 |
mqjeff |
Posted: Wed Oct 05, 2011 4:48 am Post subject: |
|
|
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 |
|
 |
Gaya3 |
Posted: Wed Oct 05, 2011 5:03 am Post subject: |
|
|
 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 |
|
 |
lancelotlinc |
Posted: Wed Oct 05, 2011 5:41 am Post subject: |
|
|
 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 |
|
 |
SANTYP |
Posted: Wed Oct 05, 2011 5:54 pm Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|