Skip to main content
summaryrefslogtreecommitdiffstats
blob: 858b937a2abe2605b6c5f4e55b1d46f066c8713c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 * The contents of this file are subject to the terms 
 * of the Common Development and Distribution License 
 * (the License).  You may not use this file except in
 * compliance with the License.
 * 
 * You can obtain a copy of the license at 
 * https://glassfish.dev.java.net/public/CDDLv1.0.html or
 * glassfish/bootstrap/legal/CDDLv1.0.txt.
 * See the License for the specific language governing 
 * permissions and limitations under the License.
 * 
 * When distributing Covered Code, include this CDDL 
 * Header Notice in each file and include the License file 
 * at glassfish/bootstrap/legal/CDDLv1.0.txt.  
 * If applicable, add the following below the CDDL Header, 
 * with the fields enclosed by brackets [] replaced by
 * you own identifying information: 
 * "Portions Copyrighted [year] [name of copyright owner]"
 * 
 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
 */


package javax.jms;

/** A <CODE>ServerSessionPool</CODE> object is an object implemented by an 
  * application server to provide a pool of <CODE>ServerSession</CODE> objects 
  * for processing the messages of a <CODE>ConnectionConsumer</CODE> (optional).
  *
  * <P>Its only method is <CODE>getServerSession</CODE>. The JMS API does not 
  * architect how the pool is implemented. It could be a static pool of 
  * <CODE>ServerSession</CODE> objects, or it could use a sophisticated 
  * algorithm to dynamically create <CODE>ServerSession</CODE> objects as 
  * needed.
  *
  * <P>If the <CODE>ServerSessionPool</CODE> is out of 
  * <CODE>ServerSession</CODE> objects, the <CODE>getServerSession</CODE> call 
  * may block. If a <CODE>ConnectionConsumer</CODE> is blocked, it cannot 
  * deliver new messages until a <CODE>ServerSession</CODE> is 
  * eventually returned.
  *
  * @version     1.0 - 9 March 1998
  * @author      Mark Hapner
  * @author      Rich Burridge
  *
  * @see javax.jms.ServerSession
  */

public interface ServerSessionPool {

    /** Return a server session from the pool.
      *
      * @return a server session from the pool
      *  
      * @exception JMSException if an application server fails to
      *                         return a <CODE>ServerSession</CODE> out of its
      *                         server session pool.
      */ 

    ServerSession
    getServerSession() throws JMSException;
}

Back to the top