## org.springframework.jms.listener.serversession
Interface ServerSessionFactory

All Known Implementing Classes:
  AbstractPoolingServerSessionFactory, CommonsPoolServerSessionFactory, SimpleServerSessionFactory

Deprecated. as of Spring 2.5, in favor of DefaultMessageListenerContainer and JmsMessageEndpointManager. To be removed in Spring 3.0.

    public interface ServerSessionFactory

SPI interface to be implemented by components that manage JMS ServerSessions. Usually, but not necessarily, an implementation of this interface will hold a pool of ServerSessions.

The passed-in ListenerSessionManager has to be used for creating and executing JMS Sessions. This session manager is responsible for registering a MessageListener with all Sessions that it creates. Consequently, the ServerSessionFactory implementation has to concentrate on the actual lifecycle (e.g. pooling) of JMS Sessions, but is not concerned about Session creation or execution.

Since:
  2.0
Author:
  Juergen Hoeller
See Also:
  `ListenerSessionManager`, `ServerSessionMessageListenerContainer`

Method Summary
`void` `close(ListenerSessionManager sessionManager)` Deprecated. Close all ServerSessions for the given session manager.
`ServerSession` `getServerSession(ListenerSessionManager sessionManager)` Deprecated. Retrieve a JMS ServerSession for the given session manager.

Method Detail

### getServerSession

    ServerSession getServerSession(ListenerSessionManager sessionManager)
                                   throws JMSException

  Deprecated.
  Retrieve a JMS ServerSession for the given session manager.

  Parameters:
    `sessionManager` - the session manager to use for creating and executing new listener sessions (implicitly indicating the target listener to invoke)
  Returns:
    the JMS ServerSession
  Throws:
    `JMSException` - if retrieval failed

### close

    void close(ListenerSessionManager sessionManager)

  Deprecated.
  Close all ServerSessions for the given session manager.

  Parameters:
    `sessionManager` - the session manager used for creating and executing new listener sessions (implicitly indicating the target listener)

Copyright © 2002-2008 The Spring Framework.