01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * 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;
25: import javax.jms.Destination;
26: import javax.jms.JMSException;
27: import javax.jms.MessageListener;
28: import javax.jms.ServerSessionPool;
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: 57209 $
39: */
40: public interface ServerSessionPoolFactory {
41: /**
42: * Set the name of the factory.
43: *
44: * @param name The name of the factory.
45: */
46: void setName(String name);
47:
48: /**
49: * Get the name of the factory.
50: *
51: * @return The name of the factory.
52: */
53: String getName();
54:
55: /**
56: * The <code>setXidFactory</code> method supplies the XidFactory that
57: * server sessions will use to get Xids to control local transactions.
58: *
59: * @param xidFactory a <code>XidFactoryMBean</code> value
60: */
61: void setXidFactory(XidFactoryMBean xidFactory);
62:
63: /**
64: * The <code>getXidFactory</code> method returns the XidFactory that
65: * server sessions will use to get xids..
66: *
67: * @return a <code>XidFactoryMBean</code> value
68: */
69: XidFactoryMBean getXidFactory();
70:
71: /**
72: * Create a new <tt>ServerSessionPool</tt>.
73: *
74: * @param destination the destination
75: * @param con the jms connection
76: * @param minSession the minimum number of sessions
77: * @param maxSession the maximum number of sessions
78: * @param keepAlive the time to keep sessions alive
79: * @param isTransacted whether the pool is transacted
80: * @param ack the acknowledegement method
81: * @param listener the listener
82: * @param useLocalTX whether to use local transactions
83: * @return A new pool.
84: * @throws JMSException for any error
85: */
86: ServerSessionPool getServerSessionPool(Destination destination,
87: Connection con, int minSession, int maxSession,
88: long keepAlive, boolean isTransacted, int ack,
89: boolean useLocalTX, MessageListener listener)
90: throws JMSException;
91: }
|