Esempio n. 1
0
  @Override
  @BeforeClass
  protected void setUp() throws Exception {
    super.setUp();

    ChainedProperties props =
        new ChainedProperties(
            "process.email.conf", ClassLoaderUtil.getClassLoader(null, getClass(), false));
    setEmailHost(props.getProperty("host", "locahost"));
    setEmailPort(props.getProperty("port", "2345"));

    server = new HornetQTaskServer(taskService, 5153);
    System.out.println("Waiting for the HornetQTask Server to come up");
    try {
      startTaskServerThread(server, false);
    } catch (Exception e) {
      startTaskServerThread(server, true);
    }

    client = new AsyncHornetQTaskClient();
    client.connect("127.0.0.1", 5153);

    setWiser(new Wiser());
    getWiser().setHostname(getEmailHost());
    getWiser().setPort(Integer.parseInt(getEmailPort()));
    getWiser().start();
  }
Esempio n. 2
0
 public void setClassLoader(ClassLoader... classLoaders) {
   this.classLoader =
       ClassLoaderUtil.getClassLoader(classLoaders, getClass(), isClassLoaderCacheEnabled());
 }