Example usage for org.springframework.jms.listener DefaultMessageListenerContainer CACHE_AUTO

List of usage examples for org.springframework.jms.listener DefaultMessageListenerContainer CACHE_AUTO

Introduction

In this page you can find the example usage for org.springframework.jms.listener DefaultMessageListenerContainer CACHE_AUTO.

Prototype

int CACHE_AUTO

To view the source code for org.springframework.jms.listener DefaultMessageListenerContainer CACHE_AUTO.

Click Source Link

Document

Constant that indicates automatic choice of an appropriate caching level (depending on the transaction management strategy).

Usage

From source file:com.ruyicai.msgcenter.jms.WithoutTMJmsConfiguration.java

/**
 * Defaults the JMS cache level if none is explicitly specified.
 * <p/>/*from  w  ww . j  ava2s  . co  m*/
 * Will return <tt>CACHE_AUTO</tt> which will pickup and use <tt>CACHE_NONE</tt>
 * if transacted has been enabled, otherwise it will use <tt>CACHE_CONSUMER</tt>
 * which is the most efficient.
 *
 * @param endpoint the endpoint
 * @return the cache level
 */
protected int defaultCacheLevel(JmsEndpoint endpoint) {
    return DefaultMessageListenerContainer.CACHE_AUTO;
}