From issues-return-24018-apmail-struts-issues-archive=struts.apache.org@struts.apache.org Mon Jun 23 17:05:31 2014 Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1DAD310D58 for ; Mon, 23 Jun 2014 17:05:31 +0000 (UTC) Received: (qmail 31635 invoked by uid 500); 23 Jun 2014 17:05:24 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 31535 invoked by uid 500); 23 Jun 2014 17:05:24 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 31312 invoked by uid 99); 23 Jun 2014 17:05:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jun 2014 17:05:24 +0000 Date: Mon, 23 Jun 2014 17:05:24 +0000 (UTC) From: "Paul Benedict (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (STR-2412) Datasource loses connection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/STR-2412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Benedict reopened STR-2412: -------------------------------- Assignee: Paul Benedict > Datasource loses connection > --------------------------- > > Key: STR-2412 > URL: https://issues.apache.org/jira/browse/STR-2412 > Project: Struts 1 > Issue Type: Bug > Components: Website > Affects Versions: 1.1.0 > Environment: Operating System: Linux > Platform: PC > Reporter: Agustin Brau > Assignee: Paul Benedict > Fix For: 1.1.2 > > > (mysql-connector-java-3.0.16-ga-bin.jar) > I have an action which executes some heavy query (creating temporary tables un > mysql). After 8 queries the connection is unexpectly closed and in the next > query returns the query was explicity closed. The pool doesn't start a new > connection and doesn't verify that the returned connection is closed. > You can simulate the error closing the connection from mysql and then when you > use the returned connection you have a broken pipe error instead of a new > connection. > Thanks > The action: > javax.sql.DataSource ds = getDataSource(request); > java.sql.Connection conexion = ds.getConnection(); > try{ > java.sql.Statement stmt = conexion.createStatement(); > try{ > stmt.executeUpdate("drop table "+ tablaTemporal); > }catch(SQLException e){ > System.out.println("[PrepareMostrarQryAction] Borrando tabla > temporal codigo:"+e.getErrorCode()+"-> "+ e.toString()); > } > . > . > . > try{ > System.out.println("Cerrando la conexion"); > conexion.isClosed(); > //antes decia conexion.Close(); > }catch(SQLException e){ > System.out.println("[PrepareMostrarQryAction] Error cerrando > conexion a SQL: " + e.toString()); > } > } -- This message was sent by Atlassian JIRA (v6.2#6252)