The Spring Framework

org.springframework.jms.listener.serversession
Class ServerSessionMessageListenerContainer102

java.lang.Object
  extended by org.springframework.jms.support.JmsAccessor
      extended by org.springframework.jms.support.destination.JmsDestinationAccessor
          extended by org.springframework.jms.listener.AbstractMessageListenerContainer
              extended by org.springframework.jms.listener.serversession.ServerSessionMessageListenerContainer
                  extended by org.springframework.jms.listener.serversession.ServerSessionMessageListenerContainer102
All Implemented Interfaces:
DisposableBean, InitializingBean, Lifecycle, ListenerSessionManager

public class ServerSessionMessageListenerContainer102
extends ServerSessionMessageListenerContainer

A subclass of ServerSessionMessageListenerContainer that uses the JMS 1.0.2 specification, rather than the JMS 1.1 methods used by ServerSessionMessageListenerContainer itself. This class can be used for JMS 1.0.2 providers, offering the same facility as ServerSessionMessageListenerContainer 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.AbstractMessageListenerContainer
AbstractMessageListenerContainer.SharedConnectionNotInitializedException
 
Field Summary
 
Fields inherited from class org.springframework.jms.support.JmsAccessor
logger
 
Constructor Summary
ServerSessionMessageListenerContainer102()
           
 
Method Summary
protected  Connection createConnection()
          This implementation overrides the superclass method to use JMS 1.0.2 API.
protected  ConnectionConsumer createConsumer(Connection con, Destination destination, ServerSessionPool pool)
          This implementation overrides the superclass method to use JMS 1.0.2 API.
protected  Session createSession(Connection con)
          This implementation overrides the superclass method to use JMS 1.0.2 API.
protected  boolean isClientAcknowledge(Session session)
          This implementation overrides the superclass method to avoid using JMS 1.1's Session getAcknowledgeMode() method.
 
Methods inherited from class org.springframework.jms.listener.serversession.ServerSessionMessageListenerContainer
createListenerSession, createServerSessionPool, destroyListener, executeListenerSession, getConsumer, getMaxMessagesPerTask, getServerSessionFactory, registerListener, setMaxMessagesPerTask, setServerSessionFactory, sharedConnectionEnabled
 
Methods inherited from class org.springframework.jms.listener.AbstractMessageListenerContainer
afterPropertiesSet, checkMessageListener, commitIfNecessary, destroy, doExecuteListener, doInvokeListener, doInvokeListener, doRescheduleTask, doStart, doStop, establishSharedConnection, executeListener, getClientId, getDestination, getDestinationName, getDurableSubscriptionName, getExceptionListener, getMessageListener, getMessageSelector, getSharedConnection, handleListenerException, initialize, invokeExceptionListener, invokeListener, isActive, isExposeListenerSession, isRunning, isSubscriptionDurable, prepareSharedConnection, refreshSharedConnection, rescheduleTaskIfNecessary, rollbackOnExceptionIfNecessary, setAutoStartup, setClientId, setDestination, setDestinationName, setDurableSubscriptionName, setExceptionListener, setExposeListenerSession, setMessageListener, setMessageSelector, setSubscriptionDurable, shutdown, start, startSharedConnection, stop, stopSharedConnection, waitWhileNotRunning
 
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

ServerSessionMessageListenerContainer102

public ServerSessionMessageListenerContainer102()
Method Detail

createConnection

protected Connection createConnection()
                               throws JMSException
This implementation overrides the superclass method to use JMS 1.0.2 API.

Overrides:
createConnection in class AbstractMessageListenerContainer
Returns:
the new JMS Connection
Throws:
JMSException - if thrown by JMS API methods

createConsumer

protected ConnectionConsumer createConsumer(Connection con,
                                            Destination destination,
                                            ServerSessionPool pool)
                                     throws JMSException
This implementation overrides the superclass method to use JMS 1.0.2 API.

Overrides:
createConsumer in class ServerSessionMessageListenerContainer
Parameters:
con - the JMS Connection to create a Session for
Returns:
the new JMS Session
Throws:
JMSException - if thrown by JMS API methods

createSession

protected Session createSession(Connection con)
                         throws JMSException
This implementation overrides the superclass method to use JMS 1.0.2 API.

Overrides:
createSession in class AbstractMessageListenerContainer
Parameters:
con - the JMS Connection to create a Session for
Returns:
the new JMS Session
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:
isClientAcknowledge in class AbstractMessageListenerContainer
Parameters:
session - the JMS Session to check
Throws:
JMSException - if thrown by JMS API methods

The Spring Framework

Copyright © 2002-2006 The Spring Framework.