Re: how can i fix this DBPool???

From: Joe Weinstein (joeNOSPAM_at_bea.com)
Date: 10/01/04

  • Next message: Paul O'Donnell: "Re: A good IDE??"
    Date: Fri, 01 Oct 2004 11:51:22 -0700
    To: slzang <slzang@mailst.xjtu.edu.cn>
    
    

    slzang wrote:

    > hi all:
    > I am using a dbpool written by myself,but recently i find there are
    > some trouble to connect mysql server.
    > Mysql server set wait_timeout=28800(default 8hours),so when the
    > connections in dbpool do not be used in 8 hours, mysql server will
    > disconnect it,then i got the exception message :communication link failure.
    > I hate myself why i do not use j2ee datasoure at first.but there are
    > so lot of works to be done if i change to j2ee datasoure, i really do
    > not want to reconstruct it.
    > In dbpool i try to use java.sql.connection.isClose() to detect
    > whether a connection is valid, but i fail.
    > So is there any ideas?

    Hi. isClosed() only tells you if *you* have called close(), not if the connection
    is still good. The only way to overcome a DBMS timeout is to make the pool run a
    test query (select 1). If it succeeds, the connection is good. If it fails, close it and
    make a replacement. DataSource won't help this issue at all.

    Joe Weinstein at BEA

    >
    > Regards
    > Shawn Lee zang


  • Next message: Paul O'Donnell: "Re: A good IDE??"

    Relevant Pages

    • Re: [ANN] DBPool : JDBC Connection Pooling - v4.7.2 released
      ... > A new version of DBPool has been released, ... > applications that require high performance database access. ... > * User-configurable pools to achieve high performance ... > * User-definable connection validation allows increased reliability ...
      (comp.lang.java.databases)
    • DBPool: JDBC Connection Pooling - updated
      ... Latest update of DBPool is available at http://www.snaq.net/java/DBPool/ ... applications that require high performance database access. ... User-definable connection validation allows increased reliability ... DBPool has been used in many large-scale commercial applications throughout ...
      (comp.lang.java.databases)
    • [ANN] DBPool : JDBC Connection Pooling - v4.7.2 released
      ... A new version of DBPool has been released, ... applications that require high performance database access. ... * User-configurable pools to achieve high performance ... * User-definable connection validation allows increased reliability ...
      (comp.lang.java.databases)
    • [ANN] DBPool : JDBC Connection Pooling - v4.7 released
      ... A new version of DBPool has been released, ... applications that require high performance database access. ... User-configurable pools to achieve high performance ... User-definable connection validation allows increased reliability ...
      (comp.lang.java.databases)
    • how can i fix this DBPool???
      ... I am using a dbpool written by myself,but recently i find there are ... some trouble to connect mysql server. ... connections in dbpool do not be used in 8 hours, ... I hate myself why i do not use j2ee datasoure at first.but there are ...
      (comp.lang.java.databases)