Results 1 to 7 of 7

Thread: Connection Refresh Delay

  1. #1
    Join Date
    Oct 2006
    Posts
    27

    Default Connection Refresh Delay

    I'm using JndiObjectFactoryBean and JdbcTemplate to access my datasources managed by a Weblogic 8.1 and Oracle 8.1/9. The problem is that whenever the connections are lost the first guy that hits a resource that depends of those connections has to wait for the connection timeout and then the time to get a new one something that is very annoying. Do you know anyway to avoid this to happen?

    Thanks,

    Johann

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    On connection pools like c3p0 and DBCP there are various testOn* settings you can use. I'd presume your connection pool would have the same kind of setting.
    Last edited by karldmoore; Aug 27th, 2007 at 04:04 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  3. #3
    Join Date
    Oct 2006
    Posts
    27

    Default

    The weblogic's connection pools have all the test options but the problem is that if at the moment when you are trying to use a connection they are all dead you are going to have to wait for the connection timeout and then for the time that takes to get a new one from the connection pool. I was thinking about generating a daemon to check via JNDI or JMX the status of the connections and force a refresh if they are dead but before going this way I was trying to find another solution via Spring, any ideas?

    Thanks,

    Johann

  4. #4
    Join Date
    Oct 2006
    Posts
    27

    Default

    From the jdbc dev2dev forum:

    "The pool can be configured to test connections periodically independent of
    user load, and will replace bad ones if the DBMS is still up and available.
    This would prevent later incoming user requests from having to wait.
    Joe"

    So that solved the problem.

    Cheers!

    Johann

  5. #5
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Glad you found a solution, is a possible to post the link? Might help others in future.
    Last edited by karldmoore; Aug 27th, 2007 at 04:04 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  6. #6
    Join Date
    Oct 2006
    Posts
    27

  7. #7
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Thanks Johann hopefully this might be useful for other people in the future .
    Last edited by karldmoore; Aug 27th, 2007 at 04:04 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •