I am trying to implement Oracle stored procedures using java and I am
having some trouble with the connection.
These are complicated procedures that use many methods of different
classes. I would also like these classes to be able to run outside of
oracle if needed.
I hava a connect class that gets a database connection and closes it.
The version of this class that I deploy to Oracle gets the default
connection and the close operation is disabled.
Many of my methods must connect to the database, do their work, and
close the connection. Everything works fine outside of Oracle but
when I deploy to Oracle and execute the procedure I get an error that
too many cursors are open. If I actually call the close method of the
connection object I seem to loose all instances of my connection. The
docuemntation says the close() emthod does nothing.
I think this is because I create a lot of conenctions but I am using
the default connection so it should only be 1 connection.
Can anyone help me with this?
Do you have any suggestions?
Below is a sample of the tryp things I must do:
Class LoadTable
connect
get all items to load
loop
call InsertClass.load with item
end loop
close connection (if not in oracle)
Class InsertClass
load method
connect
call getID
insert the record
close conenction (if not in oracle)
getID method