} else {
messageHandler = new InOnlyMessageHandler(getEndpoint(), executor);
}
} else {
if (isTransacted()) {
messageHandler = new InOutMessageHandler(getEndpoint(), executor, synchronization);
} else {
messageHandler = new InOutMessageHandler(getEndpoint(), executor);
}
}
messageHandler.setSession(session);
messageHandler.setProcessor(getAsyncProcessor());
messageHandler.setSynchronous(isSynchronous());