public class ConnectionPool extends Object implements ExceptionListener
Modifier and Type | Field and Description |
---|---|
protected Connection |
connection |
Constructor and Description |
---|
ConnectionPool(Connection connection) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Session |
createSession(boolean transacted,
int ackMode) |
void |
decrementReferenceCount() |
boolean |
expiredCheck()
Determines if this Connection has expired.
|
long |
getBlockIfSessionPoolIsFullTimeout()
Returns the timeout to use for blocking creating new sessions
|
Connection |
getConnection() |
long |
getExpiryTimeout() |
int |
getIdleTimeout() |
int |
getMaximumActiveSessionPerConnection() |
int |
getNumActiveSessions() |
int |
getNumIdleSessions() |
int |
getNumSessions() |
void |
incrementReferenceCount() |
boolean |
isBlockIfSessionPoolIsFull() |
boolean |
isReconnectOnException() |
boolean |
isUseAnonymousProducers() |
protected Session |
makeSession(SessionKey key) |
void |
onException(JMSException exception) |
void |
setBlockIfSessionPoolIsFull(boolean block)
Configure whether the createSession method should block when there are no more idle sessions and the
pool already contains the maximum number of active sessions.
|
void |
setBlockIfSessionPoolIsFullTimeout(long blockIfSessionPoolIsFullTimeout)
Controls the behavior of the internal session pool.
|
void |
setExpiryTimeout(long expiryTimeout) |
void |
setHasExpired(boolean val) |
void |
setIdleTimeout(int idleTimeout) |
void |
setMaximumActiveSessionPerConnection(int maximumActiveSessionPerConnection) |
void |
setReconnectOnException(boolean reconnectOnException)
Controls weather the underlying connection should be reset (and renewed) on JMSException
|
void |
setUseAnonymousProducers(boolean value) |
void |
start() |
String |
toString() |
protected void |
unWrap(Connection connection) |
protected Connection |
wrap(Connection connection) |
protected Connection connection
public ConnectionPool(Connection connection)
public void setHasExpired(boolean val)
protected Session makeSession(SessionKey key) throws JMSException
JMSException
protected Connection wrap(Connection connection)
protected void unWrap(Connection connection)
public void start() throws JMSException
JMSException
public Connection getConnection()
public Session createSession(boolean transacted, int ackMode) throws JMSException
JMSException
public void close()
public void incrementReferenceCount()
public void decrementReferenceCount()
public boolean expiredCheck()
public int getIdleTimeout()
public void setIdleTimeout(int idleTimeout)
public void setExpiryTimeout(long expiryTimeout)
public long getExpiryTimeout()
public int getMaximumActiveSessionPerConnection()
public void setMaximumActiveSessionPerConnection(int maximumActiveSessionPerConnection)
public boolean isUseAnonymousProducers()
public void setUseAnonymousProducers(boolean value)
public int getNumSessions()
public int getNumIdleSessions()
public int getNumActiveSessions()
public void setBlockIfSessionPoolIsFull(boolean block)
block
- Indicates whether blocking should be used to wait for more space to create a session.public boolean isBlockIfSessionPoolIsFull()
public long getBlockIfSessionPoolIsFullTimeout()
setBlockIfSessionPoolIsFull(boolean)
public void setBlockIfSessionPoolIsFullTimeout(long blockIfSessionPoolIsFullTimeout)
blockIfSessionPoolIsFullTimeout
- - if blockIfSessionPoolIsFullTimeout is true,
then use this setting to configure how long to block before retrypublic boolean isReconnectOnException()
public void setReconnectOnException(boolean reconnectOnException)
reconnectOnException
- Boolean value that configures whether reconnect on exception should happenpublic void onException(JMSException exception)
onException
in interface ExceptionListener
Copyright © 2005–2017 FuseSource, Corp.. All rights reserved.