code: private void registerObject(DigitalObject obj)
              throws StorageDeviceException {
          String theLabel = "the label field is no longer used";
          String ownerID = "the ownerID field is no longer used";
          String pid = obj.getPid();
  
          Connection conn = null;
          PreparedStatement st = null;
          try {
              conn = m_connectionPool.getReadWriteConnection();
              st = conn.prepareStatement(INSERT_PID_QUERY);
              st.setString(1, pid);
              st.setString(2, ownerID);
              st.setString(3, theLabel);
              st.executeUpdate();
          } catch (SQLException sqle) {
              // clean up if the INSERT didn't succeeed
              try {
                  unregisterObject(obj);
              } catch (Throwable th) {
              }
              // ...then notify the caller with the original exception
              throw new StorageDeviceException(
                      "Unexpected error from SQL database while registering object: " +
                              sqle.getMessage(), sqle);
          } finally {
              try {
                  if (st != null) {
                      st.close();
                  }
                  if (conn != null) {
                      m_connectionPool.free(conn);
                  }
              } catch (Exception sqle) {
                  throw new StorageDeviceException(
                          "Unexpected error from SQL database while registering object: " +
                                  sqle.getMessage(), sqle);
              } finally {
                  st = null;
              }
          }
      }
docs: Adds a new object. The caller *must* ensure the object does not already
  exist in the registry before calling this method.