public StdServerSessionPool(Connection con,
boolean transacted,
int ack,
boolean useLocalTX,
MessageListener listener,
int maxSession,
XidFactoryMBean xidFactory) throws JMSException {
this.con = con;
this.ack = ack;
this.listener = listener;
this.transacted = transacted;
this.poolSize = maxSession;
this.sessionPool = new ArrayList(maxSession);
this.useLocalTX = useLocalTX;
this.xidFactory = xidFactory;
// setup the worker pool
executor = new PooledExecutor(poolSize);
executor.setMinimumPoolSize(0);
executor.setKeepAliveTime(1000 * 30);
executor.waitWhenBlocked();
executor.setThreadFactory(new DefaultThreadFactory());
// finish initializing the session
create();
log.debug("Server Session pool set up");
}
Construct a StdServerSessionPool using the default pool size. Parameters:
con - connection to get sessions from
transacted - transaction mode when not XA (
ack - ackmode when not XA
listener - the listener the sessions will call
maxSession - maximum number of sessions in the pool
isuseLocalTX - Description of Parameter
Throws:
JMSException - Description of Exception
- exception:
JMSException - Description of Exception
|