You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2014/06/23 19:13:25 UTC
[jira] [Resolved] (STR-2412) Datasource loses connection
[ https://issues.apache.org/jira/browse/STR-2412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict resolved STR-2412.
--------------------------------
Resolution: Incomplete
> 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
>
> (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)