예제 #1
0
  /**
   * Sets up the JMS service and starts a thread to poll for a Heritrix instance.
   *
   * @param pLabel - just a junk parameter to allow for both public and private constructors for a
   *     singleton instance.
   */
  private JMSInterface(String pLabel) {
    try {
      ConfigurationManager cm = new ConfigurationManager();
      newSubmissionsChannel = cm.getString("newSubmissionsChannel", accessKey);
      statusUpdateChannel = cm.getString("statusUpdateChannel", accessKey);
      ingestionChannel = cm.getString("ingestionChannel", accessKey);
      repositoryID = cm.getString("repositoryID", accessKey);
      submissionProfile = cm.getString("submissionProfile", accessKey);

      msgService = new MsgService();
      msgService.setMessageListener(newSubmissionsChannel, this);
      RegistrationThread rThread = new RegistrationThread();
      rThread.start();

    } catch (Exception e) {
      e.printStackTrace();
    }
  } // - private JMSInterface