Java Code Examples for org.springframework.jms.connection.JmsResourceHolder#containsSession()
The following examples show how to use
org.springframework.jms.connection.JmsResourceHolder#containsSession() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractPollingMessageListenerContainer.java From spring-analysis-note with MIT License | 5 votes |
/** * This implementation checks whether the Session is externally synchronized. * In this case, the Session is not locally transacted, despite the listener * container's "sessionTransacted" flag being set to "true". * @see org.springframework.jms.connection.JmsResourceHolder */ @Override protected boolean isSessionLocallyTransacted(Session session) { if (!super.isSessionLocallyTransacted(session)) { return false; } JmsResourceHolder resourceHolder = (JmsResourceHolder) TransactionSynchronizationManager.getResource(obtainConnectionFactory()); return (resourceHolder == null || resourceHolder instanceof LocallyExposedJmsResourceHolder || !resourceHolder.containsSession(session)); }
Example 2
Source File: AbstractPollingMessageListenerContainer.java From java-technology-stack with MIT License | 5 votes |
/** * This implementation checks whether the Session is externally synchronized. * In this case, the Session is not locally transacted, despite the listener * container's "sessionTransacted" flag being set to "true". * @see org.springframework.jms.connection.JmsResourceHolder */ @Override protected boolean isSessionLocallyTransacted(Session session) { if (!super.isSessionLocallyTransacted(session)) { return false; } JmsResourceHolder resourceHolder = (JmsResourceHolder) TransactionSynchronizationManager.getResource(obtainConnectionFactory()); return (resourceHolder == null || resourceHolder instanceof LocallyExposedJmsResourceHolder || !resourceHolder.containsSession(session)); }
Example 3
Source File: AbstractPollingMessageListenerContainer.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * This implementation checks whether the Session is externally synchronized. * In this case, the Session is not locally transacted, despite the listener * container's "sessionTransacted" flag being set to "true". * @see org.springframework.jms.connection.JmsResourceHolder */ @Override protected boolean isSessionLocallyTransacted(Session session) { if (!super.isSessionLocallyTransacted(session)) { return false; } JmsResourceHolder resourceHolder = (JmsResourceHolder) TransactionSynchronizationManager.getResource(getConnectionFactory()); return (resourceHolder == null || resourceHolder instanceof LocallyExposedJmsResourceHolder || !resourceHolder.containsSession(session)); }