org.jboss.jms.asf
Class StdServerSessionPool

java.lang.Object
  extended by org.jboss.jms.asf.StdServerSessionPool
All Implemented Interfaces:
javax.jms.ServerSessionPool

public class StdServerSessionPool
extends Object
implements javax.jms.ServerSessionPool

Implementation of ServerSessionPool.

Version:
$Revision: 57209 $
Author:
Peter Antman ., Hiram Chirino ., Adrian Brock

Constructor Summary
StdServerSessionPool(javax.jms.Destination destination, javax.jms.Connection con, boolean transacted, int ack, boolean useLocalTX, javax.jms.MessageListener listener, int minSession, int maxSession, long keepAlive, org.jboss.tm.XidFactoryMBean xidFactory, TransactionManager tm)
          Construct a StdServerSessionPool.
 
Method Summary
 void clear()
          Clear the pool, clear out both threads and ServerSessions, connection.stop() should be run before this method.
 javax.jms.ServerSession getServerSession()
          Get a server session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StdServerSessionPool

public StdServerSessionPool(javax.jms.Destination destination,
                            javax.jms.Connection con,
                            boolean transacted,
                            int ack,
                            boolean useLocalTX,
                            javax.jms.MessageListener listener,
                            int minSession,
                            int maxSession,
                            long keepAlive,
                            org.jboss.tm.XidFactoryMBean xidFactory,
                            TransactionManager tm)
                     throws javax.jms.JMSException
Construct a StdServerSessionPool. Note the maxSession parameter controls both the maximum number of sessions in the pool, as well as the number of listener threads assigned to service requests from the JMS Provider.

Parameters:
destination - the destination
con - connection to get sessions from
transacted - transaction mode when not XA (
ack - ackmode when not XA
listener - the listener the sessions will call
minSession - minumum number of sessions in the pool
maxSession - maximum number of sessions in the pool
keepAlive - the time to keep sessions alive
xidFactory - the xid factory
tm - the transaction manager
Throws:
javax.jms.JMSException - Description of Exception
Method Detail

getServerSession

public javax.jms.ServerSession getServerSession()
                                         throws javax.jms.JMSException
Get a server session.

Specified by:
getServerSession in interface javax.jms.ServerSessionPool
Returns:
A server session.
Throws:
javax.jms.JMSException - Failed to get a server session.

clear

public void clear()
Clear the pool, clear out both threads and ServerSessions, connection.stop() should be run before this method.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.