System.out.println(">>> Human Task Server Stopped!");
}
public TaskClient initTaskClient() {
TaskClient client = new TaskClient(new HornetQTaskClientConnector("tasksQueue/appclient",
new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
//boolean connected = client.connect("127.0.0.1", 9123);
boolean connected = client.connect("127.0.0.1", 5446);
int retry = 0;
while (!connected) {
try {
Thread.sleep(2000);
} catch (InterruptedException ex) {
java.util.logging.Logger.getLogger(HumanTaskServerService.class.getName()).log(Level.SEVERE, null, ex);
}
//connected = client.connect("127.0.0.1", 9123);
connected = client.connect("127.0.0.1", 5446);
if (!connected) {
retry++;
}
}