There is an older oracle database that I make a connection to, but the
connection isn't stable and it just goes away after a period of time.
I need to be able to try to catch that and reconnect if it has gone
away.
While inspecting the object that Sequel.connect makes, I see that
there is a test_connection method, but that returns true even after I
see I lost the connection. Below is some snips from irb, I did cut
out a lot of the stack trace.
irb(main):014:0> DB = Sequel.connect('oracle://
test:[EMAIL PROTECTED]:1521/DB')
irb(main):015:0> rows = DB[:reporter_status].filter(:firstoccurrence
=> "28-NOV-08")
=> #<Sequel::Oracle::Dataset: "SELECT * FROM \"REPORTER_STATUS\" WHERE
(\"FIRSTOCCURRENCE\" = '28-NOV-08')">
irb(main):016:0> rows.count
OCIError: ORA-03114: not connected to ORACLE
from stmt.c:539:in oci8lib.so
irb(main):017:0> DB.test_connection
=> true
irb(main):018:0> DB.disconnect
OCIError: ORA-03114: not connected to ORACLE
from svcctx.c:144:in oci8lib.so
You can see that after I try to do rows.count, that test_connection is
returning true. Are there parameters I need to pass to it? Should I
be testing the connection another way?
Thanks,
Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---