List of usage examples for org.springframework.jms.connection JmsResourceHolder containsSession
public boolean containsSession(Session session)
From source file:org.springframework.jms.connection.ConnectionFactoryUtils.java
/** * Determine whether the given JMS Session is transactional, that is, * bound to the current thread by Spring's transaction facilities. * @param session the JMS Session to check * @param cf the JMS ConnectionFactory that the Session originated from * @return whether the Session is transactional *///from www . j ava2 s . c o m public static boolean isSessionTransactional(@Nullable Session session, @Nullable ConnectionFactory cf) { if (session == null || cf == null) { return false; } JmsResourceHolder resourceHolder = (JmsResourceHolder) TransactionSynchronizationManager.getResource(cf); return (resourceHolder != null && resourceHolder.containsSession(session)); }