コード例 #1
0
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   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);
   }
   AsyncHornetQHTWorkItemHandler handler = new AsyncHornetQHTWorkItemHandler(ksession);
   setClient(handler.getClient());
   setHandler(handler);
 }
コード例 #2
0
 protected void tearDown() throws Exception {
   ((AsyncHornetQHTWorkItemHandler) getHandler()).dispose();
   getClient().disconnect();
   server.stop();
   super.tearDown();
 }