code: public static synchronized ITangoDB getDatabase() throws DevFailed {
          ITangoDB tangoDb = null;
          if (useDb) {
              final String tangoHost = TangoHostManager.getFirstTangoHost();
              // Search if database object already created for this host and port
              if (databaseMap.containsKey(tangoHost)) {
                  tangoDb = databaseMap.get(tangoHost);
              } else {
                  // Else, create a new database object
                  DevFailed lastError = null;
                  // try all tango hosts until connection is established
                  final Map<String, String> tangoHostMap = TangoHostManager.getTangoHostPortMap();
                  for (final Entry<String, String> entry : tangoHostMap.entrySet()) {
                      try {
                          lastError = null;
                          tangoDb = new Database(entry.getKey(), entry.getValue());
                          databaseMap.put(tangoHost, tangoDb);
                          break;
                      } catch (final DevFailed e) {
                          lastError = e;
                      }
                  }
                  if (lastError != null) {
                      throw lastError;
                  }
              }
          } else {
              tangoDb = fileDatabase;
          }
          return tangoDb;
      }
docs: Get the database object using tango_host system property.
  
  @return
  @throws DevFailed