Example #1
0
  private void connectToDatabase() {

    try {
      dbBrokerWrapper wrapper = DbProcessor.getConnectionID(m_DataQuery, getClass().getName());

      m_DataQuery = wrapper.getDataQuery();
      connectionID = wrapper.getConnectionID();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Example #2
0
  public RemsUpdater(String propertiesFile) {
    super();
    m_DataQuery = DbProcessor.getDbBroker(m_DataQuery);

    ResourceBundle resourceBundle = null;
    try {
      resourceBundle = ResourceBundle.getBundle(propertiesFile);
      m_Flush =
          new Integer(resourceBundle.getString("DrFirstECommerce.update_processor_interval"))
              .intValue();
      m_RetryNum = new Integer(resourceBundle.getString("DrFirstECommerce.retry_num")).intValue();
      m_RetryInterval =
          new Integer(resourceBundle.getString("DrFirstECommerce.retry_interval")).intValue();
      eCommerceURL = resourceBundle.getString("DrFirstECommerce.update_url");
      m_LogFile = new LogFile(resourceBundle.getString("DrFirstECommerce.log_file_path"));
      secretPattern = resourceBundle.getString("DrFirstECommerce.secret_pattern");
    } catch (Exception e) {
      System.err.println("Error reading the properties file.");
      m_Flush = 1440;
      eCommerceURL = "";
    }
  }