1 Reply Latest reply on Mar 10, 2010 10:10 AM by Mike Finn

    [CachedConnectionManager] Closing a connection for you

    Ismael Fernandez Newbie

      Hi, I´m new in with JBoss Seam and I have a problem. I´m trying to call a Store Procedure with a CallableStatement. All the process works well, but when a finish, I have this error:

       

      [CachedConnectionManager] Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@16add0e

       

      I think it´s due to not close the connection, but I always close them! This is my source code:

       

              Connection conn = null;
              CallableStatement stmt = null;
              Session sesion = null;
              boolean exito = true;
              String msj = null;
              int error = 0;
             
              try{
                 
                  sesion = (Session) em.getDelegate();
                  conn = sesion.connection();
                 
                  stmt = conn.prepareCall("{call PCK_SINGLE_SIGN_ON.INSERT_SSO_TRABAJADOR(" + Utilidades.setNumParamsQuery(22) + ")}");
                  stmt.registerOutParameter(1, OracleTypes.INTEGER);
                  stmt.registerOutParameter(2, OracleTypes.VARCHAR);
                  stmt.setString(3, identificador);
                  stmt.setString(4, nombre);
                  stmt.setString(5, apellido1);
                  stmt.setString(6, apellido2);
                  stmt.setString(7, getNombreCompleto());
                  stmt.setString(8, nifDni);
                  stmt.setString(9, Utilidades.getFechaDMA(fNacimiento));
                  stmt.setString(10, idSsoDepartamento);
                  stmt.setString(11, keydel);
                  stmt.setString(12, telefono);
                  stmt.setString(13, extension);
                  stmt.setString(14, email);
                  stmt.setString(15, direccion);
                  stmt.setString(16, poblacion);
                  stmt.setString(17, codigoPostal);
                  stmt.setString(18, telefono2);
                  stmt.setString(19, idSsoPuesto);
                  stmt.setInt(20, 0);
                  stmt.setString(21, identity.getUsername());
                  stmt.setString(22, usuario);
                         
                  stmt.execute();
                 
                  error = stmt.getInt(1);
                  msj = stmt.getString(2);


                  stmt.close();

                  conn.close();
                 
              }catch(Exception e){
                  log.info(e.getMessage());
                  exito = false;
              }finally{
                  log.info(error + " " + msj);
              }

       

       

      Could this error be a bug? or, is there any solution?

       

      Thank´s