DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34269>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34269

           Summary: Datasource loses connection
           Product: Struts
           Version: 1.1 Final
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Web Site
        AssignedTo: dev@struts.apache.org
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


(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());
            }
       }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to