Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> java stored procedure - how do I connect?
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
call InsertClass.load with item
end loop
close connection (if not in oracle)
connect
call getID insert the record
getID method
connect
get the id from sequence
close conenction (if not in oracle)
return id
Thanks for any help,
Don Received on Thu Sep 13 2001 - 20:27:12 CDT