public boolean forceReleasePrepareStatement(int statementId) throws QueryException {
  if (lock.tryLock()) {
    try {
      checkClose();
      try {
        writer.closePrepare(statementId);
        return true;
      }
 catch (      IOException e) {
        throw new QueryException("Could not deallocate query: " + e.getMessage(),-1,CONNECTION_EXCEPTION.getSqlState(),e);
      }
    }
  finally {
      lock.unlock();
    }
  }
 else {
    statementIdToRelease=statementId;
  }
  return false;
}

public boolean forceReleasePrepareStatement ( int statementId ) throws QueryException { if ( lock . tryLock ( ) ) { try { checkClose ( ) ; try { writer . closePrepare ( statementId ) ; return true ; } catch ( IOException e ) { throw new QueryException ( "Could not deallocate query: " + e . getMessage ( ) , - 1 , CONNECTION_EXCEPTION . getSqlState ( ) , e ) ; } } finally { lock . unlock ( ) ; } } else { statementIdToRelease = statementId ; } return false ; }
force release of prepare statement that are not used . this method will be call when adding a new preparestatement in cache , so the packet can be send to server without problem .
