|
Joram 5.2.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.jms.pool.PooledConnectionFactory
public class PooledConnectionFactory
A ConnectionFactory which pools Connection for reuse.
Constructor Summary | |
---|---|
PooledConnectionFactory(javax.jms.ConnectionFactory cf)
Creates a new pool for the specified ConnectionFactory. |
|
PooledConnectionFactory(javax.jms.ConnectionFactory cf,
int maxFreeConnections)
Creates a new pool for the specified ConnectionFactory. |
Method Summary | |
---|---|
javax.jms.Connection |
createConnection()
API method, creates a connection with the default user identity. |
javax.jms.Connection |
createConnection(java.lang.String name,
java.lang.String password)
API method, creates a connection with the specified user identity. |
protected ConnectionPool |
createConnectionPool(int maxFreeConnections)
|
ConnectionFactory |
getConnectionFactory()
Returns the underlying ConnectionFactory used to create the connections. |
int |
getMaxFreeConnections()
Returns the maximum number of free connections for an identity in the pool. |
void |
setMaxFreeConnections(int maxFreeConnections)
Sets the maximum number of free connections for an identity in the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PooledConnectionFactory(javax.jms.ConnectionFactory cf)
cf
- The ConnectionFactory used to really create the connections.public PooledConnectionFactory(javax.jms.ConnectionFactory cf, int maxFreeConnections)
cf
- The ConnectionFactory used to really create the connections.maxFreeConnections
- The maximum number of free connections for an identity in the pool.Method Detail |
---|
public ConnectionFactory getConnectionFactory()
public int getMaxFreeConnections()
public void setMaxFreeConnections(int maxFreeConnections)
maxFreeConnections
- the maximum number of free connections to setpublic javax.jms.Connection createConnection() throws javax.jms.JMSException
createConnection
in interface javax.jms.ConnectionFactory
javax.jms.JMSSecurityException
- If the default identification is incorrect.
java.lang.IllegalStateException
- If the server is not listening.
javax.jms.JMSException
ConnectionFactory.createConnection()
public javax.jms.Connection createConnection(java.lang.String name, java.lang.String password) throws javax.jms.JMSException
createConnection
in interface javax.jms.ConnectionFactory
name
- the caller's user name.password
- the caller's password.
javax.jms.JMSSecurityException
- If the user identification is incorrect.
java.lang.IllegalStateException
- If the server is not listening.
javax.jms.JMSException
ConnectionFactory.createConnection(String, String)
protected ConnectionPool createConnectionPool(int maxFreeConnections)
maxFreeConnections
- The maximum number of free connections for an identity in the pool.
|
Joram 5.2.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |