You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Christoph Grothaus (JIRA)" <ji...@apache.org> on 2008/03/28 08:32:28 UTC

[jira] Created: (DBCP-263) Use a queryTimeout for the validationQuery in PoolableConnectionFactory

Use a queryTimeout for the validationQuery in PoolableConnectionFactory
-----------------------------------------------------------------------

                 Key: DBCP-263
                 URL: https://issues.apache.org/jira/browse/DBCP-263
             Project: Commons Dbcp
          Issue Type: Improvement
    Affects Versions: 1.2.2, 1.2.1, 1.2
            Reporter: Christoph Grothaus
            Priority: Minor


PoolableConnectionFactory.validateConnection(Connection conn) should use java.sql.Statement.setQueryTimeout(int) to avoid network problems and inappropriate validation queries. The timeout should either be a sensible default (say 5 secs) or be configurable.

Links:
- http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java?view=markup
- http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DBCP-263) Use a queryTimeout for the validationQuery in PoolableConnectionFactory

Posted by "Gerhard Kersten (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBCP-263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588536#action_12588536 ] 

Gerhard Kersten commented on DBCP-263:
--------------------------------------

For us it's the same, and it's really mission-critical. 

Background: A firewall cuts a TCP connection after some time, but does not close it. With "validationQuery" dbcp waits forever for the validation query, making this feature completely useless.

For a proposal see: http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg92474.html

> Use a queryTimeout for the validationQuery in PoolableConnectionFactory
> -----------------------------------------------------------------------
>
>                 Key: DBCP-263
>                 URL: https://issues.apache.org/jira/browse/DBCP-263
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2, 1.2.1, 1.2.2
>            Reporter: Christoph Grothaus
>            Priority: Minor
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> PoolableConnectionFactory.validateConnection(Connection conn) should use java.sql.Statement.setQueryTimeout(int) to avoid network problems and inappropriate validation queries. The timeout should either be a sensible default (say 5 secs) or be configurable.
> Links:
> - http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java?view=markup
> - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DBCP-263) Use a queryTimeout for the validationQuery in PoolableConnectionFactory

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBCP-263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz closed DBCP-263.
----------------------------

    Resolution: Duplicate

This issue duplicates DBCP-226

> Use a queryTimeout for the validationQuery in PoolableConnectionFactory
> -----------------------------------------------------------------------
>
>                 Key: DBCP-263
>                 URL: https://issues.apache.org/jira/browse/DBCP-263
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2, 1.2.1, 1.2.2
>            Reporter: Christoph Grothaus
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: DBCP-263-validationQuery.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> PoolableConnectionFactory.validateConnection(Connection conn) should use java.sql.Statement.setQueryTimeout(int) to avoid network problems and inappropriate validation queries. The timeout should either be a sensible default (say 5 secs) or be configurable.
> Links:
> - http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java?view=markup
> - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (DBCP-263) Use a queryTimeout for the validationQuery in PoolableConnectionFactory

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBCP-263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12592617#action_12592617 ] 

bayard edited comment on DBCP-263 at 4/26/08 6:39 PM:
-------------------------------------------------------------

Seems like a good idea. Patches welcome :)

      was (Author: bayard):
    Seems like a good idea.
  
> Use a queryTimeout for the validationQuery in PoolableConnectionFactory
> -----------------------------------------------------------------------
>
>                 Key: DBCP-263
>                 URL: https://issues.apache.org/jira/browse/DBCP-263
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2, 1.2.1, 1.2.2
>            Reporter: Christoph Grothaus
>            Priority: Minor
>             Fix For: 1.3
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> PoolableConnectionFactory.validateConnection(Connection conn) should use java.sql.Statement.setQueryTimeout(int) to avoid network problems and inappropriate validation queries. The timeout should either be a sensible default (say 5 secs) or be configurable.
> Links:
> - http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java?view=markup
> - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DBCP-263) Use a queryTimeout for the validationQuery in PoolableConnectionFactory

Posted by "Christoph Grothaus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBCP-263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christoph Grothaus updated DBCP-263:
------------------------------------

    Attachment: DBCP-263-validationQuery.patch

Here's the patch. To be applied on the "trunk" folder of DBCP. Sets the query timeout of the validation query to a fix value of 5 seconds.

> Use a queryTimeout for the validationQuery in PoolableConnectionFactory
> -----------------------------------------------------------------------
>
>                 Key: DBCP-263
>                 URL: https://issues.apache.org/jira/browse/DBCP-263
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2, 1.2.1, 1.2.2
>            Reporter: Christoph Grothaus
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: DBCP-263-validationQuery.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> PoolableConnectionFactory.validateConnection(Connection conn) should use java.sql.Statement.setQueryTimeout(int) to avoid network problems and inappropriate validation queries. The timeout should either be a sensible default (say 5 secs) or be configurable.
> Links:
> - http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java?view=markup
> - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DBCP-263) Use a queryTimeout for the validationQuery in PoolableConnectionFactory

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBCP-263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated DBCP-263:
-------------------------------

    Fix Version/s: 1.3

Seems like a good idea.

> Use a queryTimeout for the validationQuery in PoolableConnectionFactory
> -----------------------------------------------------------------------
>
>                 Key: DBCP-263
>                 URL: https://issues.apache.org/jira/browse/DBCP-263
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2, 1.2.1, 1.2.2
>            Reporter: Christoph Grothaus
>            Priority: Minor
>             Fix For: 1.3
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> PoolableConnectionFactory.validateConnection(Connection conn) should use java.sql.Statement.setQueryTimeout(int) to avoid network problems and inappropriate validation queries. The timeout should either be a sensible default (say 5 secs) or be configurable.
> Links:
> - http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java?view=markup
> - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.