org.jboss.resource.adapter.jms.inflow
Class JmsServerSessionPool

java.lang.Object
  extended byorg.jboss.resource.adapter.jms.inflow.JmsServerSessionPool
All Implemented Interfaces:
ServerSessionPool (src)

public class JmsServerSessionPool
extends java.lang.Object
implements ServerSessionPool (src)

A generic jms session pool.


Constructor Summary
JmsServerSessionPool(JmsActivation (src)  activation)
          Create a new session pool
 
Method Summary
 JmsActivation (src) getActivation()
           
 ServerSession (src) getServerSession()
          Return a server session from the pool.
protected  void returnServerSession(JmsServerSession (src)  session)
          Return the server session
protected  void setupConsumer()
          Setup the connection consumer
protected  void setupSessions()
          Setup the sessions
 void start()
          Start the server session pool
 void stop()
          Stop the server session pool
protected  void teardownConsumer()
          Stop the connection consumer
protected  void teardownSessions()
          Stop the sessions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsServerSessionPool

public JmsServerSessionPool(JmsActivation (src)  activation)
Create a new session pool

Parameters:
activation - the jms activation
Method Detail

getActivation

public JmsActivation (src)  getActivation()
Returns:
the activation

start

public void start()
           throws java.lang.Exception
Start the server session pool

Throws:
Exeption - for any error
java.lang.Exception

stop

public void stop()
Stop the server session pool


getServerSession

public ServerSession (src)  getServerSession()
                               throws JMSException (src) 
Description copied from interface: ServerSessionPool (src)
Return a server session from the pool.

Specified by:
getServerSession in interface ServerSessionPool (src)
Returns:
a server session from the pool
Throws:
JMSException (src) - if an application server fails to return a ServerSession out of its server session pool.

returnServerSession

protected void returnServerSession(JmsServerSession (src)  session)
Return the server session

Parameters:
session - the session

setupSessions

protected void setupSessions()
                      throws java.lang.Exception
Setup the sessions

Throws:
Exeption - for any error
java.lang.Exception

teardownSessions

protected void teardownSessions()
Stop the sessions


setupConsumer

protected void setupConsumer()
                      throws java.lang.Exception
Setup the connection consumer

Throws:
Exeption - for any error
java.lang.Exception

teardownConsumer

protected void teardownConsumer()
Stop the connection consumer