01: /*
02: * @(#)ServerSessionPool.java 1.12 02/04/09
03: *
04: * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * SUN PROPRIETARY/CONFIDENTIAL.
07: * This software is the proprietary information of Sun Microsystems, Inc.
08: * Use is subject to license terms.
09: *
10: */
11:
12: package javax.jms;
13:
14: /** A <CODE>ServerSessionPool</CODE> object is an object implemented by an
15: * application server to provide a pool of <CODE>ServerSession</CODE> objects
16: * for processing the messages of a <CODE>ConnectionConsumer</CODE> (optional).
17: *
18: * <P>Its only method is <CODE>getServerSession</CODE>. The JMS API does not
19: * architect how the pool is implemented. It could be a static pool of
20: * <CODE>ServerSession</CODE> objects, or it could use a sophisticated
21: * algorithm to dynamically create <CODE>ServerSession</CODE> objects as
22: * needed.
23: *
24: * <P>If the <CODE>ServerSessionPool</CODE> is out of
25: * <CODE>ServerSession</CODE> objects, the <CODE>getServerSession</CODE> call
26: * may block. If a <CODE>ConnectionConsumer</CODE> is blocked, it cannot
27: * deliver new messages until a <CODE>ServerSession</CODE> is
28: * eventually returned.
29: *
30: * @version 1.0 - 9 March 1998
31: * @author Mark Hapner
32: * @author Rich Burridge
33: *
34: * @see javax.jms.ServerSession
35: */
36:
37: public interface ServerSessionPool {
38:
39: /** Return a server session from the pool.
40: *
41: * @return a server session from the pool
42: *
43: * @exception JMSException if an application server fails to
44: * return a <CODE>ServerSession</CODE> out of its
45: * server session pool.
46: */
47:
48: ServerSession getServerSession() throws JMSException;
49: }
|