org.springframework.jms.listener
Class DefaultMessageListenerContainer102
java.lang.Object
   org.springframework.jms.support.JmsAccessor
org.springframework.jms.support.JmsAccessor
       org.springframework.jms.support.destination.JmsDestinationAccessor
org.springframework.jms.support.destination.JmsDestinationAccessor
           org.springframework.jms.listener.AbstractJmsListeningContainer
org.springframework.jms.listener.AbstractJmsListeningContainer
               org.springframework.jms.listener.AbstractMessageListenerContainer
org.springframework.jms.listener.AbstractMessageListenerContainer
                   org.springframework.jms.listener.AbstractPollingMessageListenerContainer
org.springframework.jms.listener.AbstractPollingMessageListenerContainer
                       org.springframework.jms.listener.DefaultMessageListenerContainer
org.springframework.jms.listener.DefaultMessageListenerContainer
                           org.springframework.jms.listener.DefaultMessageListenerContainer102
org.springframework.jms.listener.DefaultMessageListenerContainer102
- All Implemented Interfaces: 
- BeanNameAware, DisposableBean, InitializingBean, Lifecycle
- public class DefaultMessageListenerContainer102 
- extends DefaultMessageListenerContainer
A subclass of DefaultMessageListenerContainer 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
 DefaultMessageListenerContainer does for JMS 1.1 providers.
- Since:
- 2.0
- Author:
- Juergen Hoeller
 
 
 
 
 
 
 
 
 
| Methods inherited from class org.springframework.jms.listener.DefaultMessageListenerContainer | 
| createDefaultTaskExecutor, doInitialize, doRescheduleTask, doShutdown, establishSharedConnection, getActiveConsumerCount, getCacheLevel, getConcurrentConsumers, getIdleTaskExecutionLimit, getMaxConcurrentConsumers, getMaxMessagesPerTask, getScheduledConsumerCount, handleListenerSetupFailure, initialize, messageReceived, noMessageReceived, recoverAfterListenerSetupFailure, refreshConnectionUntilSuccessful, refreshDestination, scheduleNewInvokerIfAppropriate, setCacheLevel, setCacheLevelName, setConcurrentConsumers, setIdleTaskExecutionLimit, setMaxConcurrentConsumers, setMaxMessagesPerTask, setRecoveryInterval, setTaskExecutor, sharedConnectionEnabled, sleepInbetweenRecoveryAttempts, start, startSharedConnection, stop, stopSharedConnection, validateConfiguration | 
 
| Methods inherited from class org.springframework.jms.listener.AbstractPollingMessageListenerContainer | 
| createListenerConsumer, doReceiveAndExecute, getTransactionManager, isPubSubNoLocal, isSessionLocallyTransacted, receiveAndExecute, receiveMessage, setPubSubNoLocal, setReceiveTimeout, setSessionTransacted, setTransactionManager, setTransactionName, setTransactionTimeout | 
 
| Methods inherited from class org.springframework.jms.listener.AbstractMessageListenerContainer | 
| checkMessageListener, commitIfNecessary, doExecuteListener, doInvokeListener, doInvokeListener, executeListener, getDefaultSubscriptionName, getDestination, getDestinationDescription, getDestinationName, getDurableSubscriptionName, getExceptionListener, getMessageListener, getMessageSelector, handleListenerException, invokeExceptionListener, invokeListener, isAcceptMessagesWhileStopping, isExposeListenerSession, isSubscriptionDurable, rollbackIfNecessary, rollbackOnExceptionIfNecessary, setAcceptMessagesWhileStopping, setDestination, setDestinationName, setDurableSubscriptionName, setExceptionListener, setExposeListenerSession, setMessageListener, setMessageSelector, setSubscriptionDurable | 
 
| Methods inherited from class org.springframework.jms.listener.AbstractJmsListeningContainer | 
| afterPropertiesSet, createSharedConnection, destroy, doStart, doStop, getBeanName, getClientId, getPausedTaskCount, getSharedConnection, isActive, isRunning, logRejectedTask, prepareSharedConnection, refreshSharedConnection, rescheduleTaskIfNecessary, resumePausedTasks, runningAllowed, setAutoStartup, setBeanName, setClientId, shutdown, stop | 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
DefaultMessageListenerContainer102
public DefaultMessageListenerContainer102()
getConnection
protected Connection getConnection(JmsResourceHolder holder)
- This implementation overrides the superclass method to accept either
 a QueueConnection or a TopicConnection, depending on the domain.
 
- 
- Overrides:
- getConnectionin class- AbstractPollingMessageListenerContainer
 
- 
- Parameters:
- holder- the JmsResourceHolder
- Returns:
- an appropriate Connection fetched from the holder,
 or nullif none found
 
getSession
protected Session getSession(JmsResourceHolder holder)
- This implementation overrides the superclass method to accept either
 a QueueSession or a TopicSession, depending on the domain.
 
- 
- Overrides:
- getSessionin class- AbstractPollingMessageListenerContainer
 
- 
- Parameters:
- holder- the JmsResourceHolder
- Returns:
- an appropriate Session fetched from the holder,
 or nullif none found
 
createConnection
protected Connection createConnection()
                               throws JMSException
- This implementation overrides the superclass method to use JMS 1.0.2 API.
 
- 
- Overrides:
- createConnectionin 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
- This implementation overrides the superclass method to use JMS 1.0.2 API.
 
- 
- Overrides:
- createSessionin 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
- This implementation overrides the superclass method to use JMS 1.0.2 API.
 
- 
- Overrides:
- createConsumerin class- AbstractPollingMessageListenerContainer
 
- 
- 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
- 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:
- isClientAcknowledgein 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
 
Copyright © 2002-2008 The Spring Framework.