docs: private Connection getConnection(String fullLogDirectory) throws Exception {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "getConnection", fullLogDirectory);
          Connection conn = null;
  
          // Parse database properties
          StringTokenizer st = new StringTokenizer(fullLogDirectory, "?");
          String cname = st.nextToken();
          if (tc.isDebugEnabled())
              Tr.debug(tc, "cname = " + cname);
  
          // Extract the DB related properties
          Properties dbStringProps = new Properties();
          String dbPropertiesString = st.nextToken();
          if (tc.isDebugEnabled())
              Tr.debug(tc, "dbPropertiesString = " + dbPropertiesString);
  
          dbStringProps.load(new StringReader(dbPropertiesString.replace(',', '\n')));
          if (tc.isDebugEnabled())
              Tr.debug(tc, "dbStringProps = " + dbStringProps);
  
          // Extract the DSName
          String dsName = dbStringProps.getProperty("datasource");
          if (tc.isDebugEnabled())
              Tr.debug(tc, "Extracted Data Source name = " + dsName);
  
          // Extract the optional tablesuffix
          String tableSuffix = dbStringProps.getProperty("tablesuffix");
          if (tc.isDebugEnabled())
              Tr.debug(tc, "Extracted Table Suffix = " + tableSuffix);
  
          if (tableSuffix != null && !tableSuffix.equals("")) {
              _recoveryTableNameSuffix = tableSuffix;
              if (tc.isDebugEnabled())
                  Tr.debug(tc, "Full RecoveryTableName = " + _recoveryTableName + _recoveryTableNameSuffix);
          }
  
          // We'll look up the DataSource definition in jndi but jndi is initialising in another
          // thread so we need to handle the situation where a first lookup does not succeed. This
          // processing is wrapped up in the SQLNonTransactionalDataSource
          SQLNonTransactionalDataSource sqlNonTranDS = new SQLNonTransactionalDataSource(dsName, _customLogProperties);
  
          _theDS = sqlNonTranDS.getDataSource();
  
          // We've looked up the DS, so now we can get a JDBC connection
          if (_theDS != null) {
              // Get connection to database via first datasource
              conn = _theDS.getConnection();
  
              if (tc.isDebugEnabled())
                  Tr.debug(tc, "Got connection: " + conn);
              DatabaseMetaData mdata = conn.getMetaData();
              if (tc.isDebugEnabled())
                  Tr.debug(tc, "Got metadata: " + mdata);
              String dbName = mdata.getDatabaseProductName();
              if (dbName.toLowerCase().contains("oracle")) {
                  _isOracle = true;
                  // We can set the transient error codes to watch for at this point too.
                  _sqlTransientErrorCodes = _oracleTransientErrorCodes;
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "This is an Oracle Database");
                  // Flag the we can tolerate transient SQL error codes
                  sqlTransientErrorHandlingEnabled = true;
              } else if (dbName.toLowerCase().contains("db2")) {
                  // we are DB2
                  _isDB2 = true;
                  _sqlTransientErrorCodes = _db2TransientErrorCodes;
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "This is a DB2 Database");
                  // Flag the we can tolerate transient SQL error codes
                  sqlTransientErrorHandlingEnabled = true;
              } else {
                  // Not DB2 or Oracle, cannot handle transient SQL errors
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "This is neither Oracle nor DB2, it is " + dbName);
              }
  
              String dbVersion = mdata.getDatabaseProductVersion();
              if (tc.isDebugEnabled())
                  Tr.debug(tc, "You are now connected to " + dbName + ", version " + dbVersion);
          }
          if (tc.isEntryEnabled())
              Tr.exit(tc, "getConnection", conn);
          return conn;
      }