Interface IPeekableListener<M>
- All Superinterfaces:
org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.Aware, FrankElement, HasApplicationContext, HasName, IConfigurable, IListener<M>, IPullingListener<M>, IScopeProvider, NameAware
- All Known Implementing Classes:
JdbcListener, JdbcQueryListener, JdbcTableListener, MessageStoreListener
PullingListener extension that checks for available messages to retrieve
without starting a XA transaction. With a MS SQL database and a high load it
has been noticed that the application and database transaction coordinator
were out of sync which resulted in hanging distributed transactions.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidsetPeekUntransacted(boolean b) when true, then PollingListener container will execute getRawMessage() only when hasRawMessageAvailable() has returned true.Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface FrankElement
addConfigWarningMethods inherited from interface HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface IConfigurable
configureMethods inherited from interface IListener
afterMessageProcessed, extractMessage, start, stopMethods inherited from interface IPullingListener
closeThread, getRawMessage, openThread
-
Method Details
-
hasRawMessageAvailable
- Throws:
ListenerException
-
setPeekUntransacted
void setPeekUntransacted(boolean b) when true, then PollingListener container will execute getRawMessage() only when hasRawMessageAvailable() has returned true. This avoids rolling back a lot of XA transactions, that appears to be problematic on MS SQL Server- Default value
- true
-
isPeekUntransacted
boolean isPeekUntransacted()
-