By default work item handlers use Mina connector for task client. So there are two options:
- create your workitem handler implementation that just extends default and override connect method
- for some work item handlers (for instance WSHumanTaskHandler) there is a dedicated method to set task client that can be used
What you need to do is to create task client instance that utilize hornetq client handler and client connector:
TaskClient client = new TaskClient(new HornetQTaskClientConnector("HornetQConnector",
new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
taskClient.connect(host, port);
// this method is not available for all handlers
handler.setClient(client);
HTH