org.exolab.jms.client
Class JmsServerSessionPool

java.lang.Object
  |
  +--org.exolab.jms.client.JmsServerSessionPool
All Implemented Interfaces:
javax.jms.ServerSessionPool

public class JmsServerSessionPool
extends java.lang.Object
implements javax.jms.ServerSessionPool

This class is an example implements of the ServerSessionPool interface, which is primarily by the application server facility. It is the responsibility of the application server to implement this class.

The ServerSessionPool manages a collection of ServerSession objects, which in themselves map a thread to a Session object.

Before using the class the client must call the init(int, javax.jms.MessageListener) method.

Version:
$Revision: 1.6 $ $Date: 2003/08/07 13:32:50 $
Author:
Jim Alateras, Tim Anderson

Method Summary
 javax.jms.ServerSession getServerSession()
           
static void init(int size, javax.jms.MessageListener listener)
          This method initialises the pool and must be called before any other class or instance methods.
static JmsServerSessionPool instance()
          Return the singleton instance of the server session pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public static void init(int size,
                        javax.jms.MessageListener listener)
This method initialises the pool and must be called before any other class or instance methods.
Parameters:
size - server session pool size
listener - message listener that sessions will be initialised with.

instance

public static JmsServerSessionPool instance()
                                     throws javax.jms.JMSException
Return the singleton instance of the server session pool. If one does not exist then create it, cache it and return it to the caller.

If init hasn't been called before retrieving the instance then a JMSException is raised.

Returns:
JmsServerSessionPool
Throws:
javax.jms.JMSException -  

getServerSession

public javax.jms.ServerSession getServerSession()
                                         throws javax.jms.JMSException
Specified by:
getServerSession in interface javax.jms.ServerSessionPool


Copyright © 1999-2003 The OpenJMS Group. All Rights Reserved.