예제 #1
0
  public ClientSupportManager(ITransactionManager txManager, IConfiguration config) {
    super(txManager);
    m_txManager = txManager;
    m_configuration = config;
    File nfsRoot = NFSUtils.getNFSRoot(config);
    m_cacheBaseDir = new File(nfsRoot, "sysconf/cache");
    try {
      m_sr = SecureRandom.getInstance("SHA1PRNG");
    } catch (NoSuchAlgorithmException ex) {
      // should never occur.
      m_logCategory.fatal("Can't initialize", ex);
      throw new RuntimeException("Initialization failed: " + ex);
    }

    String prefix = config.getProperty("client.url.prefix");
    if (prefix == null) {
      prefix = "http://" + config.getProperty("default.backend.hostname") + "/cache/client";
    }
    m_urlPrefix = prefix;

    m_smtpSession = createSMTPSession(config);
  }
예제 #2
0
 protected File getNfsRoot() {
   return NFSUtils.getNFSRoot(m_configuration);
 }