if (HornetQMessageHandler.trace)
{
HornetQMessageHandler.log.trace("onMessage(" + message + ")");
}
HornetQMessage msg = HornetQMessage.createMessage(message, session);
boolean beforeDelivery = false;
try
{
if(activation.getActivationSpec().getTransactionTimeout() > 0)
{
getTm().setTransactionTimeout(activation.getActivationSpec().getTransactionTimeout());
}
endpoint.beforeDelivery(HornetQActivation.ONMESSAGE);
beforeDelivery = true;
msg.doBeforeReceive();
((MessageListener)endpoint).onMessage(msg);
message.acknowledge();
try
{
endpoint.afterDelivery();