Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Oracle JDBC driver connection timeout

Options
  • 24-03-2006 11:55am
    #1
    Posts: 0


    Hey guys,

    I'm looking for a bit of direction in the above subject.
    I'm not too familiar with Oracle drivers but I'm sure that, somewhere, there is a way to configure a timeout on the database connection but I can't seem to find it anywhere.

    I have an oracle-ds.xml file (on JBoss), I connect to my servlet on JBoss, the database is purposely configured wrong (to test this timeout) and, when creating a connection, it hangs for about 4 minutes and throws an Exception.

    Does anyone know what the setting for manually setting the timeout on an Oracle database connection is?

    I've tried <idle-timeout-minutes>, <blocking-timeout-millis> but to no avail. I noticed that the Driver interface in Java allows for the passing of a Properties object, which could come from the oracle-ds.xml file (something like timeout=100) but I can't find a reference to this anywhere on the web.

    Any help regarding this would be great, sorry if my description is vague.


Comments

  • Moderators, Politics Moderators Posts: 39,800 Mod ✭✭✭✭Seth Brundle




  • Posts: 0 [Deleted User]


    Thanks for reply, do you know if there is a specific setting to use in the xml file to configure the timeout?


  • Moderators, Politics Moderators Posts: 39,800 Mod ✭✭✭✭Seth Brundle


    from www.jbossfaq.com
    [/code]<prepared-statement-cache-size>50</prepared-statement-cache-size>
    <min-pool-size>1</min-pool-size>
    <max-pool-size>200</max-pool-size>
    <max-idle-timeout>0</max-idle-timeout>
    <blocking-timeout-millis>30000</blocking-timeout-millis>
    <idle-timeout-minutes>15</idle-timeout-minutes>
    <track-statements>false</track-statements>
    [/code]
    these tags wont available in jboss-3.2.6 datasource file we have to add manually..


  • Posts: 0 [Deleted User]


    I read that Oracle database drivers can receive information through properties (e.g. name=value), have you ever heard of this or actually passed anything to an Oracle driver this way?

    Basically, I want to set JBoss to just timeout gracefully , if it can't connect to the database (say the database is down)...any other specific setting you can think of for this?


Advertisement