Class SpringJmsConnector

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

public class SpringJmsConnector extends AbstractJmsConfigurator implements IListenerConnector<javax.jms.Message>, IThreadCountControllable, org.springframework.beans.factory.BeanFactoryAware, javax.jms.ExceptionListener, org.springframework.jms.listener.SessionAwareMessageListener<javax.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<javax.jms.Message> jmsListener, javax.jms.ConnectionFactory connectionFactory, CredentialFactory credentialFactory, javax.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<javax.jms.Message>
      Throws:
      ConfigurationException
    • start

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

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

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

      public void onException(javax.jms.JMSException e)
      Specified by:
      onException in interface javax.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)