public class ConnectionPool extends Object implements javax.jms.ExceptionListener
Modifier and Type | Field and Description |
---|---|
protected javax.jms.Connection |
connection |
Constructor and Description |
---|
ConnectionPool(javax.jms.Connection connection) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
javax.jms.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
|
javax.jms.Connection |
getConnection() |
long |
getExpiryTimeout() |
int |
getIdleTimeout() |
int |
getMaximumActiveSessionPerConnection() |
int |
getNumActiveSessions() |
int |
getNumIdleSessions() |
int |
getNumSessions() |
void |
incrementReferenceCount() |
boolean |
isBlockIfSessionPoolIsFull() |
boolean |
isReconnectOnException() |
boolean |
isUseAnonymousProducers() |
protected javax.jms.Session |
makeSession(SessionKey key) |
void |
onException(javax.jms.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(javax.jms.Connection connection) |
protected javax.jms.Connection |
wrap(javax.jms.Connection connection) |
protected javax.jms.Connection connection
public ConnectionPool(javax.jms.Connection connection)
public void setHasExpired(boolean val)
protected javax.jms.Session makeSession(SessionKey key) throws javax.jms.JMSException
javax.jms.JMSException
protected javax.jms.Connection wrap(javax.jms.Connection connection)
protected void unWrap(javax.jms.Connection connection)
public void start() throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.Connection getConnection()
public javax.jms.Session createSession(boolean transacted, int ackMode) throws javax.jms.JMSException
javax.jms.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(javax.jms.JMSException exception)
onException
in interface javax.jms.ExceptionListener
Copyright © 2005–2018 FuseSource, Corp.. All rights reserved.