SimpleMessageListenerContainer102 (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.jms.listener

## Class SimpleMessageListenerContainer102

- 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.SimpleMessageListenerContainer
          - - org.springframework.jms.listener.SimpleMessageListenerContainer102

- All Implemented Interfaces:
    ExceptionListener, Aware, BeanNameAware, DisposableBean, InitializingBean, Lifecycle, Phased, SmartLifecycle

  Deprecated.
  as of Spring 3.0, in favor of the JMS 1.1 based `SimpleMessageListenerContainer`

      @Deprecated
      public class SimpleMessageListenerContainer102
      extends SimpleMessageListenerContainer

  A subclass of `SimpleMessageListenerContainer` for the JMS 1.0.2 specification, not relying on JMS 1.1 methods like SimpleMessageListenerContainer itself.

  This class can be used for JMS 1.0.2 providers, offering the same facility as SimpleMessageListenerContainer does for JMS 1.1 providers.

  Since:
    2.0
  Author:
    Juergen Hoeller

- - ### Nested Class Summary

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

      `AbstractJmsListeningContainer.SharedConnectionNotInitializedException`

  - ### Field Summary

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

      `lifecycleMonitor, sharedConnectionMonitor`

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

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleMessageListenerContainer102()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Connection` | `createConnection()` Deprecated. This implementation overrides the superclass method to use JMS 1.0.2 API.
    `protected MessageConsumer` | `createConsumer(Session session, Destination destination)` Deprecated. This implementation overrides the superclass method to use JMS 1.0.2 API.
    `protected Session` | `createSession(Connection con)` Deprecated. This implementation overrides the superclass method to use JMS 1.0.2 API.
    `protected boolean` | `isClientAcknowledge(Session session)` Deprecated. This implementation overrides the superclass method to avoid using JMS 1.1's Session `getAcknowledgeMode()` method.

    - ### Methods inherited from class org.springframework.jms.listener.SimpleMessageListenerContainer

      `createListenerConsumer, doInitialize, doShutdown, doStart, initializeConsumers, isPubSubNoLocal, onException, prepareSharedConnection, processMessage, setConcurrency, setConcurrentConsumers, setConnectLazily, setPubSubNoLocal, setTaskExecutor, sharedConnectionEnabled, validateConfiguration`

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

      `checkMessageListener, commitIfNecessary, doExecuteListener, doInvokeListener, doInvokeListener, executeListener, getDefaultSubscriptionName, getDestination, getDestinationDescription, getDestinationName, getDurableSubscriptionName, getExceptionListener, getMessageListener, getMessageSelector, handleListenerException, invokeErrorHandler, invokeExceptionListener, invokeListener, isAcceptMessagesWhileStopping, isExposeListenerSession, isSessionLocallyTransacted, isSubscriptionDurable, rollbackIfNecessary, rollbackOnExceptionIfNecessary, setAcceptMessagesWhileStopping, setDestination, setDestinationName, setDurableSubscriptionName, setErrorHandler, setExceptionListener, setExposeListenerSession, setMessageListener, setMessageSelector, setSubscriptionDurable`

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

      `afterPropertiesSet, createSharedConnection, destroy, doRescheduleTask, doStop, establishSharedConnection, getBeanName, getClientId, getPausedTaskCount, getPhase, getSharedConnection, initialize, isActive, isAutoStartup, isRunning, logRejectedTask, refreshSharedConnection, rescheduleTaskIfNecessary, resumePausedTasks, runningAllowed, setAutoStartup, setBeanName, setClientId, setPhase, shutdown, start, startSharedConnection, stop, stop, stopSharedConnection`

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

      `getDestinationResolver, isPubSubDomain, resolveDestinationName, setDestinationResolver, setPubSubDomain`

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

      `convertJmsAccessException, getConnectionFactory, getSessionAcknowledgeMode, isSessionTransacted, setConnectionFactory, setSessionAcknowledgeMode, setSessionAcknowledgeModeName, setSessionTransacted`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### SimpleMessageListenerContainer102

          public SimpleMessageListenerContainer102()

      Deprecated.

  - ### Method Detail

    - #### createConnection

          protected Connection createConnection()
                                         throws JMSException

      Deprecated.
      This implementation overrides the superclass method to use JMS 1.0.2 API.
      Overrides:
        `createConnection` in class `JmsAccessor`
      Returns:
        the new JMS Connection
      Throws:
        `JMSException` - if thrown by JMS API methods
      See Also:
        `ConnectionFactory.createConnection()`

    - #### createSession

          protected Session createSession(Connection con)
                                   throws JMSException

      Deprecated.
      This implementation overrides the superclass method to use JMS 1.0.2 API.
      Overrides:
        `createSession` in class `JmsAccessor`
      Parameters:
        `con` - the JMS Connection to create a Session for
      Returns:
        the new JMS Session
      Throws:
        `JMSException` - if thrown by JMS API methods
      See Also:
        `Connection.createSession(boolean, int)`

    - #### createConsumer

          protected MessageConsumer createConsumer(Session session,
                                       Destination destination)
                                            throws JMSException

      Deprecated.
      This implementation overrides the superclass method to use JMS 1.0.2 API.
      Overrides:
        `createConsumer` in class `SimpleMessageListenerContainer`
      Parameters:
        `session` - the JMS Session to create a MessageConsumer for
        `destination` - the JMS Destination to create a MessageConsumer for
      Returns:
        the new JMS MessageConsumer
      Throws:
        `JMSException` - if thrown by JMS API methods

    - #### isClientAcknowledge

          protected boolean isClientAcknowledge(Session session)
                                         throws JMSException

      Deprecated.
      This implementation overrides the superclass method to avoid using JMS 1.1's Session `getAcknowledgeMode()` method. The best we can do here is to check the setting on the listener container.
      Overrides:
        `isClientAcknowledge` in class `JmsAccessor`
      Parameters:
        `session` - the JMS Session to check
      Returns:
        whether the given Session is in client acknowledge mode
      Throws:
        `JMSException` - if thrown by JMS API methods
      See Also:
        `Session.getAcknowledgeMode()`, `Session.CLIENT_ACKNOWLEDGE`