}
consumer = (ClientConsumerInternal)session.createConsumer(queueName, selectorString);
}
// Create the endpoint, if we are transacted pass the sesion so it is enlisted, unless using Local TX
MessageEndpointFactory endpointFactory = activation.getMessageEndpointFactory();
useLocalTx = !activation.isDeliveryTransacted() && activation.getActivationSpec().isUseLocalTx();
transacted = activation.isDeliveryTransacted();
if (activation.isDeliveryTransacted() && !activation.getActivationSpec().isUseLocalTx())
{
endpoint = endpointFactory.createEndpoint(session);
useXA = true;
}
else
{
endpoint = endpointFactory.createEndpoint(null);
useXA = false;
}
consumer.setMessageHandler(this);
}