Class SpringJmsConnector

java.lang.Object
org.frankframework.unmanaged.AbstractJmsConfigurator
org.frankframework.unmanaged.SpringJmsConnector
All Implemented Interfaces:
jakarta.jms.ExceptionListener, IListenerConnector<jakarta.jms.Message>, IThreadCountControllable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.jms.listener.SessionAwareMessageListener<jakarta.jms.Message>

public class SpringJmsConnector extends AbstractJmsConfigurator implements IListenerConnector<jakarta.jms.Message>, IThreadCountControllable, org.springframework.beans.factory.BeanFactoryAware, jakarta.jms.ExceptionListener, org.springframework.jms.listener.SessionAwareMessageListener<jakarta.jms.Message>
Configure a Spring JMS Container from a PushingJmsListener.

This implementation expects to receive an instance of org.springframework.jms.listener.DefaultMessageListenerContainer from the Spring BeanFactory. If another type of MessageListenerContainer is created by the BeanFactory, then another implementation of IListenerConnector should be provided as well.

This implementation works only with a PushingJmsListener, and not with other types PortConnectedListeners.

Since:
4.8
Author:
Tim van der Leeuw
  • Field Details

    • DEFAULT_CACHE_LEVEL_TRANSACTED

      public static final int DEFAULT_CACHE_LEVEL_TRANSACTED
      See Also:
    • DEFAULT_CACHE_LEVEL_NON_TRANSACTED

      public static final int DEFAULT_CACHE_LEVEL_NON_TRANSACTED
      See Also:
    • IDLE_TASK_EXECUTION_LIMIT

      public static final int IDLE_TASK_EXECUTION_LIMIT
      See Also:
  • Constructor Details

    • SpringJmsConnector

      public SpringJmsConnector()
  • Method Details

    • configureEndpointConnection

      public void configureEndpointConnection(IPortConnectedListener<jakarta.jms.Message> jmsListener, jakarta.jms.ConnectionFactory connectionFactory, CredentialFactory credentialFactory, jakarta.jms.Destination destination, IbisExceptionListener exceptionListener, IListenerConnector.CacheMode cacheMode, int acknowledgeMode, boolean sessionTransacted, String messageSelector, long receiveTimeout, long pollGuardInterval) throws ConfigurationException
      Specified by:
      configureEndpointConnection in interface IListenerConnector<jakarta.jms.Message>
      Throws:
      ConfigurationException
    • start

      public void start()
      Description copied from interface: IListenerConnector
      Start Listener-port to which the Listener is connected.
      Specified by:
      start in interface IListenerConnector<jakarta.jms.Message>
    • stop

      public void stop()
      Description copied from interface: IListenerConnector
      Stop Listener-port to which the Listener is connected.
      Specified by:
      stop in interface IListenerConnector<jakarta.jms.Message>
    • onMessage

      public void onMessage(jakarta.jms.Message message, jakarta.jms.Session session) throws jakarta.jms.JMSException
      Specified by:
      onMessage in interface org.springframework.jms.listener.SessionAwareMessageListener<jakarta.jms.Message>
      Throws:
      jakarta.jms.JMSException
    • onException

      public void onException(jakarta.jms.JMSException e)
      Specified by:
      onException in interface jakarta.jms.ExceptionListener
    • isThreadCountReadable

      public boolean isThreadCountReadable()
      Specified by:
      isThreadCountReadable in interface IThreadCountControllable
    • isThreadCountControllable

      public boolean isThreadCountControllable()
      Specified by:
      isThreadCountControllable in interface IThreadCountControllable
    • getCurrentThreadCount

      public int getCurrentThreadCount()
      Specified by:
      getCurrentThreadCount in interface IThreadCountControllable
    • getMaxThreadCount

      public int getMaxThreadCount()
      Specified by:
      getMaxThreadCount in interface IThreadCountControllable
    • increaseThreadCount

      public void increaseThreadCount()
      Specified by:
      increaseThreadCount in interface IThreadCountControllable
    • decreaseThreadCount

      public void decreaseThreadCount()
      Specified by:
      decreaseThreadCount in interface IThreadCountControllable
    • getLogPrefix

      public String getLogPrefix()
    • getTxManager

      public org.springframework.transaction.PlatformTransactionManager getTxManager()
    • setTxManager

      public void setTxManager(org.springframework.transaction.PlatformTransactionManager txManager)
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
    • getJmsContainer

      public org.springframework.jms.listener.DefaultMessageListenerContainer getJmsContainer()
    • getThreadsProcessing

      public AtomicInteger getThreadsProcessing()
    • getLastPollFinishedTime

      public long getLastPollFinishedTime()
    • setLastPollFinishedTime

      public void setLastPollFinishedTime(long lastPollFinishedTime)