KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jms > asf > ServerSessionPoolFactory


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2005, JBoss Inc., and individual contributors as indicated
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.jms.asf;
23
24 import javax.jms.Connection JavaDoc;
25 import javax.jms.Destination JavaDoc;
26 import javax.jms.JMSException JavaDoc;
27 import javax.jms.MessageListener JavaDoc;
28 import javax.jms.ServerSessionPool JavaDoc;
29 import org.jboss.tm.XidFactoryMBean;
30
31 /**
32  * Defines the model for creating <tt>ServerSessionPoolFactory</tt> objects. <p>
33  *
34  * @author <a HREF="mailto:peter.antman@tim.se">Peter Antman</a> .
35  * @author <a HREF="mailto:hiram.chirino@jboss.org">Hiram Chirino</a> .
36  * @author <a HREF="mailto:jason@planet57.com">Jason Dillon</a>
37  * @author <a HREF="mailto:adrian@jboss.com">Adrian Brock</a>
38  * @version $Revision: 38361 $
39  */

40 public interface ServerSessionPoolFactory
41 {
42    /**
43     * Set the name of the factory.
44     *
45     * @param name The name of the factory.
46     */

47    void setName(String JavaDoc name);
48
49    /**
50     * Get the name of the factory.
51     *
52     * @return The name of the factory.
53     */

54    String JavaDoc getName();
55
56    /**
57     * The <code>setXidFactory</code> method supplies the XidFactory that
58     * server sessions will use to get Xids to control local transactions.
59     *
60     * @param xidFactory a <code>XidFactoryMBean</code> value
61     */

62    void setXidFactory(XidFactoryMBean xidFactory);
63
64    /**
65     * The <code>getXidFactory</code> method returns the XidFactory that
66     * server sessions will use to get xids..
67     *
68     * @return a <code>XidFactoryMBean</code> value
69     */

70    XidFactoryMBean getXidFactory();
71
72    /**
73     * Create a new <tt>ServerSessionPool</tt>.
74     *
75     * @param destination the destination
76     * @param con the jms connection
77     * @param minSession the minimum number of sessions
78     * @param maxSession the maximum number of sessions
79     * @param keepAlive the time to keep sessions alive
80     * @param isTransacted whether the pool is transacted
81     * @param ack the acknowledegement method
82     * @param listener the listener
83     * @param useLocalTX whether to use local transactions
84     * @return A new pool.
85     * @throws JMSException for any error
86     */

87    ServerSessionPool JavaDoc getServerSessionPool(Destination JavaDoc destination, Connection JavaDoc con, int minSession, int maxSession,
88          long keepAlive, boolean isTransacted, int ack, boolean useLocalTX, MessageListener JavaDoc listener)
89          throws JMSException JavaDoc;
90 }
Popular Tags