public synchronized int writeToFile(JDBCSequentialFile file,byte[] data) throws SQLException {
  try {
    connection.setAutoCommit(false);
    appendToLargeObject.setBytes(1,data);
    appendToLargeObject.setInt(2,file.getId());
    appendToLargeObject.executeUpdate();
    connection.commit();
    return data.length;
  }
 catch (  SQLException e) {
    connection.rollback();
    throw e;
  }
}

public synchronized int writeToFile ( JDBCSequentialFile file , byte [ ] data ) throws SQLException { try { connection . setAutoCommit ( false ) ; appendToLargeObject . setBytes ( 1 , data ) ; appendToLargeObject . setInt ( 2 , file . getId ( ) ) ; appendToLargeObject . executeUpdate ( ) ; connection . commit ( ) ; return data . length ; } catch ( SQLException e ) { connection . rollback ( ) ; throw e ; } }
persists data to this files associated database mapping .
