KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jms > ServerSessionPool


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24
25 package javax.jms;
26
27 /** A <CODE>ServerSessionPool</CODE> object is an object implemented by an
28   * application server to provide a pool of <CODE>ServerSession</CODE> objects
29   * for processing the messages of a <CODE>ConnectionConsumer</CODE> (optional).
30   *
31   * <P>Its only method is <CODE>getServerSession</CODE>. The JMS API does not
32   * architect how the pool is implemented. It could be a static pool of
33   * <CODE>ServerSession</CODE> objects, or it could use a sophisticated
34   * algorithm to dynamically create <CODE>ServerSession</CODE> objects as
35   * needed.
36   *
37   * <P>If the <CODE>ServerSessionPool</CODE> is out of
38   * <CODE>ServerSession</CODE> objects, the <CODE>getServerSession</CODE> call
39   * may block. If a <CODE>ConnectionConsumer</CODE> is blocked, it cannot
40   * deliver new messages until a <CODE>ServerSession</CODE> is
41   * eventually returned.
42   *
43   * @version 1.0 - 9 March 1998
44   * @author Mark Hapner
45   * @author Rich Burridge
46   *
47   * @see javax.jms.ServerSession
48   */

49
50 public interface ServerSessionPool {
51
52     /** Return a server session from the pool.
53       *
54       * @return a server session from the pool
55       *
56       * @exception JMSException if an application server fails to
57       * return a <CODE>ServerSession</CODE> out of its
58       * server session pool.
59       */

60
61     ServerSession JavaDoc
62     getServerSession() throws JMSException JavaDoc;
63 }
64
Popular Tags