Hi,

When I make my tests with OJB (0.9.7), I have got an Oracle's error :
ORA-01000: maximum open cursors exceeded

This error appear when I use PB API and the method getIteratorByQuery, a
cursor is use with the iterator I keep but is not close.

For found this error, I have two tests, each test is passed 100 times. Each
test ask a maximum of 30 lines in the database (I must write these lines in
my application in a list 30 by 30).
The first test have criteria who take 10 lines in the database, I take them
with my iterator (I make an iterator.next()) and the iterator stop after 10
lines.
The second test have no criterias, we have thousand and thousand lines who
are possible to take, OJB takes the 30 first lines.

The first works fine (100 times) but the second stop after the 50 (In the
database, we have put a maximum of 50 cursors).
That's why I think the iterator keep the cursor because it is always
possible to ask the others lines.

I tried to make while (iterator.hasNext()) iterator.next(), it works but
take too much time.
I have already add broker.close() for close the PB at the end of my code,
but it doesn't close the cursor.

Do you have this problem before, do you solve it ?
Is there a configuration on OJB which can suppress cursors ? Must I use JDBC
directly for suppress them ?

Thanks in advance for your answer.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to