docs: public String getObjectId(Object obj)
      {
          Identity oid = null;
          PersistenceBroker broker = null;
  
          try
          {
              if (getCurrentDatabase() != null)
              {
                  /**
                   * is there an open database we are calling getObjectId against? if yes, use it
                   */
                  broker = PersistenceBrokerFactory.createPersistenceBroker(getCurrentDatabase().getPBKey());
              }
              else
              {
                  log.warn("Can't find open database, try to use the default configuration");
                  /**
                   * otherwise, use default.
                   */
                  broker = PersistenceBrokerFactory.defaultPersistenceBroker();
              }
  
              oid = broker.serviceIdentity().buildIdentity(obj);
          }
          finally
          {
              if(broker != null)
              {
                  broker.close();
              }
          }
          return new String(SerializationUtils.serialize(oid));
      }