AServerSessionPool
object is an object implemented by an application server to provide a pool ofServerSession
objects for processing the messages of aConnectionConsumer
(optional).
Its only method isgetServerSession
. The JMS API does not architect how the pool is implemented. It could be a static pool ofServerSession
objects, or it could use a sophisticated algorithm to dynamically createServerSession
objects as needed.
If theServerSessionPool
is out ofServerSession
objects, thegetServerSession
call may block. If aConnectionConsumer
is blocked, it cannot deliver new messages until aServerSession
is eventually returned.
ServerSession
getServerSession() Return a server session from the pool. |
publicServerSessiongetServerSession() throwsJMSException
JMSException
- if an application server fails to return aServerSession
out of its server session pool.