Example #1
0
  /**
   * It loads the objects using their non singleton implementations.
   *
   * @param propFileName the name of the properties file that needs to be picked up from
   *     PEGASUS_HOME/etc directory.If it is null, then the default properties file should be picked
   *     up.
   */
  public void loadNonSingletonObjects(String propFileName) {
    // these should be invoked in non singleton
    // manner but is not.
    mLogger = LogManagerFactory.loadSingletonInstance();

    mLogMsg = new String();
    mPoolProvider = new String();
    mProps =
        PegasusProperties.getInstance(
            (propFileName == null)
                ?
                // load the default properties file
                edu.isi.pegasus.common.util.CommonProperties.PROPERTY_FILENAME
                :
                // load the file with this name from $PEGASUS_HOME/etc directory
                propFileName);

    // these should be invoked in non singleton
    // manner but is not.
    mUserOpts = UserOptions.getInstance();

    mWorkDir = mProps.getExecDirectory();
    mStorageDir = mProps.getStorageDirectory();
    mDeepStorageStructure = mProps.useDeepStorageDirectoryStructure();
  }
Example #2
0
 /**
  * It loads the objects that the pool providers need in a singleton manner, wherever possible. If
  * the class in not implemented in Singleton manner, the objects would be loaded normally.
  */
 protected void loadSingletonObjects() {
   mLogger = LogManagerFactory.loadSingletonInstance();
   mLogMsg = new String();
   mPoolProvider = new String();
   mProps = PegasusProperties.getInstance();
   mUserOpts = UserOptions.getInstance();
   mWorkDir = mProps.getExecDirectory();
   mStorageDir = mProps.getStorageDirectory();
   mDeepStorageStructure = mProps.useDeepStorageDirectoryStructure();
 }