Class IbisMessageListenerContainer

java.lang.Object
org.springframework.jms.support.JmsAccessor
org.springframework.jms.support.destination.JmsDestinationAccessor
org.springframework.jms.listener.AbstractJmsListeningContainer
org.springframework.jms.listener.AbstractMessageListenerContainer
org.springframework.jms.listener.AbstractPollingMessageListenerContainer
org.springframework.jms.listener.DefaultMessageListenerContainer
org.frankframework.jms.IbisMessageListenerContainer
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.jms.listener.MessageListenerContainer

public class IbisMessageListenerContainer extends org.springframework.jms.listener.DefaultMessageListenerContainer
Extend the DefaultMessageListenerContainer from Spring to add trace logging and make it possible to monitor the last poll finished time.
Author:
Niels Meijer, Jaco de Groot
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.jms.listener.AbstractJmsListeningContainer

    org.springframework.jms.listener.AbstractJmsListeningContainer.SharedConnectionNotInitializedException
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.logging.log4j.Logger
     

    Fields inherited from class org.springframework.jms.listener.DefaultMessageListenerContainer

    CACHE_AUTO, CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, CACHE_SESSION, DEFAULT_RECOVERY_INTERVAL, DEFAULT_THREAD_NAME_PREFIX

    Fields inherited from class org.springframework.jms.listener.AbstractPollingMessageListenerContainer

    DEFAULT_RECEIVE_TIMEOUT

    Fields inherited from class org.springframework.jms.listener.AbstractJmsListeningContainer

    lifecycleMonitor, sharedConnectionMonitor

    Fields inherited from class org.springframework.jms.support.destination.JmsDestinationAccessor

    RECEIVE_TIMEOUT_INDEFINITE_WAIT, RECEIVE_TIMEOUT_NO_WAIT

    Fields inherited from class org.springframework.jms.support.JmsAccessor

    logger

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    commitIfNecessary(jakarta.jms.Session session, jakarta.jms.Message message)
     
    protected jakarta.jms.Connection
     
    protected jakarta.jms.Session
    createSession(jakarta.jms.Connection conn)
     
    protected jakarta.jms.Connection
     
    protected boolean
    doReceiveAndExecute(Object invoker, jakarta.jms.Session session, jakarta.jms.MessageConsumer consumer, org.springframework.transaction.TransactionStatus txStatus)
     
    protected jakarta.jms.Connection
    getConnection(org.springframework.jms.connection.JmsResourceHolder holder)
     
     
    protected jakarta.jms.Session
    getSession(org.springframework.jms.connection.JmsResourceHolder holder)
     
    protected boolean
    receiveAndExecute(Object asyncMessageListenerInvoker, jakarta.jms.Session session, jakarta.jms.MessageConsumer consumer)
     
    void
     

    Methods inherited from class org.springframework.jms.listener.DefaultMessageListenerContainer

    applyBackOffTime, createDefaultTaskExecutor, doInitialize, doRescheduleTask, doShutdown, establishSharedConnection, getActiveConsumerCount, getCacheLevel, getConcurrentConsumers, getIdleConsumerLimit, getIdleReceivesPerTaskLimit, getIdleTaskExecutionLimit, getMaxConcurrentConsumers, getMaxMessagesPerTask, getScheduledConsumerCount, handleListenerSetupFailure, initialize, isRecovering, isRegisteredWithDestination, messageReceived, noMessageReceived, recoverAfterListenerSetupFailure, refreshConnectionUntilSuccessful, refreshDestination, scheduleNewInvokerIfAppropriate, setBackOff, setCacheLevel, setCacheLevelName, setConcurrency, setConcurrentConsumers, setIdleConsumerLimit, setIdleReceivesPerTaskLimit, setIdleTaskExecutionLimit, setMaxConcurrentConsumers, setMaxMessagesPerTask, setRecoveryInterval, setTaskExecutor, sharedConnectionEnabled, start, startSharedConnection, stop, stopSharedConnection

    Methods inherited from class org.springframework.jms.listener.AbstractPollingMessageListenerContainer

    createListenerConsumer, getReceiveTimeout, getTransactionManager, isSessionLocallyTransacted, receiveMessage, setReceiveTimeout, setSessionTransacted, setTransactionManager, setTransactionName, setTransactionTimeout, shouldCommitAfterNoMessageReceived

    Methods inherited from class org.springframework.jms.listener.AbstractMessageListenerContainer

    checkMessageListener, createConsumer, createObservation, doExecuteListener, doInvokeListener, doInvokeListener, executeListener, getDefaultSubscriptionName, getDestination, getDestinationDescription, getDestinationName, getDurableSubscriptionName, getErrorHandler, getExceptionListener, getMessageConverter, getMessageListener, getMessageSelector, getObservationRegistry, getReplyQosSettings, getSubscriptionName, handleListenerException, invokeErrorHandler, invokeExceptionListener, invokeListener, isAcceptMessagesWhileStopping, isExposeListenerSession, isPubSubNoLocal, isReplyPubSubDomain, isSubscriptionDurable, isSubscriptionShared, rollbackIfNecessary, rollbackOnExceptionIfNecessary, setAcceptMessagesWhileStopping, setDestination, setDestinationName, setDurableSubscriptionName, setErrorHandler, setExceptionListener, setExposeListenerSession, setMessageConverter, setMessageListener, setMessageSelector, setObservationRegistry, setPubSubNoLocal, setReplyPubSubDomain, setReplyQosSettings, setSubscriptionDurable, setSubscriptionName, setSubscriptionShared, setupMessageListener, validateConfiguration

    Methods inherited from class org.springframework.jms.listener.AbstractJmsListeningContainer

    afterPropertiesSet, destroy, doStart, doStop, getBeanName, getClientId, getPausedTaskCount, getPhase, getSharedConnection, isActive, isAutoStartup, isRunning, logRejectedTask, prepareSharedConnection, refreshSharedConnection, releaseSharedConnection, rescheduleTaskIfNecessary, resumePausedTasks, runningAllowed, setAutoStartup, setBeanName, setClientId, setPhase, shutdown, stop

    Methods inherited from class org.springframework.jms.support.destination.JmsDestinationAccessor

    getDestinationResolver, isPubSubDomain, receiveFromConsumer, resolveDestinationName, setDestinationResolver, setPubSubDomain

    Methods inherited from class org.springframework.jms.support.JmsAccessor

    convertJmsAccessException, getConnectionFactory, getSessionAcknowledgeMode, isClientAcknowledge, isSessionTransacted, obtainConnectionFactory, setConnectionFactory, setSessionAcknowledgeMode, setSessionAcknowledgeModeName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.context.Lifecycle

    isRunning, stop

    Methods inherited from interface org.springframework.jms.listener.MessageListenerContainer

    getDestinationResolver, isPubSubDomain

    Methods inherited from interface org.springframework.context.SmartLifecycle

    getPhase, isAutoStartup
  • Field Details

    • log

      protected org.apache.logging.log4j.Logger log
  • Constructor Details

    • IbisMessageListenerContainer

      public IbisMessageListenerContainer()
  • Method Details

    • createConnection

      @Nonnull protected jakarta.jms.Connection createConnection() throws jakarta.jms.JMSException
      Overrides:
      createConnection in class org.springframework.jms.support.JmsAccessor
      Throws:
      jakarta.jms.JMSException
    • createSession

      @Nonnull protected jakarta.jms.Session createSession(@Nonnull jakarta.jms.Connection conn) throws jakarta.jms.JMSException
      Overrides:
      createSession in class org.springframework.jms.support.JmsAccessor
      Throws:
      jakarta.jms.JMSException
    • getConnection

      protected jakarta.jms.Connection getConnection(@Nonnull org.springframework.jms.connection.JmsResourceHolder holder)
      Overrides:
      getConnection in class org.springframework.jms.listener.AbstractPollingMessageListenerContainer
    • getSession

      protected jakarta.jms.Session getSession(@Nonnull org.springframework.jms.connection.JmsResourceHolder holder)
      Overrides:
      getSession in class org.springframework.jms.listener.AbstractPollingMessageListenerContainer
    • createSharedConnection

      @Nonnull protected jakarta.jms.Connection createSharedConnection() throws jakarta.jms.JMSException
      Overrides:
      createSharedConnection in class org.springframework.jms.listener.AbstractJmsListeningContainer
      Throws:
      jakarta.jms.JMSException
    • receiveAndExecute

      protected boolean receiveAndExecute(@Nonnull Object asyncMessageListenerInvoker, @Nullable jakarta.jms.Session session, @Nullable jakarta.jms.MessageConsumer consumer) throws jakarta.jms.JMSException
      Overrides:
      receiveAndExecute in class org.springframework.jms.listener.AbstractPollingMessageListenerContainer
      Throws:
      jakarta.jms.JMSException
    • doReceiveAndExecute

      protected boolean doReceiveAndExecute(@Nonnull Object invoker, @Nullable jakarta.jms.Session session, @Nullable jakarta.jms.MessageConsumer consumer, @Nullable org.springframework.transaction.TransactionStatus txStatus) throws jakarta.jms.JMSException
      Overrides:
      doReceiveAndExecute in class org.springframework.jms.listener.AbstractPollingMessageListenerContainer
      Throws:
      jakarta.jms.JMSException
    • commitIfNecessary

      protected void commitIfNecessary(@Nonnull jakarta.jms.Session session, @Nullable jakarta.jms.Message message) throws jakarta.jms.JMSException
      Overrides:
      commitIfNecessary in class org.springframework.jms.listener.AbstractMessageListenerContainer
      Throws:
      jakarta.jms.JMSException
    • setCredentialFactory

      public void setCredentialFactory(CredentialFactory credentialFactory)
    • getCredentialFactory

      public CredentialFactory getCredentialFactory()