Example usage for org.springframework.amqp.rabbit.connection ConnectionFactoryUtils isChannelTransactional

List of usage examples for org.springframework.amqp.rabbit.connection ConnectionFactoryUtils isChannelTransactional

Introduction

In this page you can find the example usage for org.springframework.amqp.rabbit.connection ConnectionFactoryUtils isChannelTransactional.

Prototype

public static boolean isChannelTransactional(Channel channel, ConnectionFactory connectionFactory) 

Source Link

Document

Determine whether the given RabbitMQ Channel is transactional, that is, bound to the current thread by Spring's transaction facilities.

Usage

From source file:org.kurento.rabbitmq.RabbitTemplate.java

/**
 * Check whether the given Channel is locally transacted, that is, whether
 * its transaction is managed by this template's Channel handling and not by
 * an external transaction coordinator.//w  w  w  .  j av a 2 s . co m
 *
 * @param channel
 *            the Channel to check
 * @return whether the given Channel is locally transacted
 * @see ConnectionFactoryUtils#isChannelTransactional
 * @see #isChannelTransacted
 */
protected boolean isChannelLocallyTransacted(Channel channel) {
    return isChannelTransacted()
            && !ConnectionFactoryUtils.isChannelTransactional(channel, getConnectionFactory());
}