Example usage for org.springframework.amqp.rabbit.connection RabbitResourceHolder isSynchronizedWithTransaction

List of usage examples for org.springframework.amqp.rabbit.connection RabbitResourceHolder isSynchronizedWithTransaction

Introduction

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

Prototype

public boolean isSynchronizedWithTransaction() 

Source Link

Document

Return whether the resource is synchronized with a transaction.

Usage

From source file:org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.java

public static void releaseResources(RabbitResourceHolder resourceHolder) {
    if (resourceHolder == null || resourceHolder.isSynchronizedWithTransaction()) {
        return;// w w w  .j  a  va2s  .  c  o  m
    }
    RabbitUtils.closeChannel(resourceHolder.getChannel());
    RabbitUtils.closeConnection(resourceHolder.getConnection());
}