java.lang.Object | +----com.ibm.mq.MQSimpleConnectionManager
An MQSimpleConnectionManager provides basic connection pooling function. You can use an MQSimpleConnectionManager either as the default connection manager, or as a parameter to an MQQueueManager constructor. When an MQQueueManager is constructed, the most recently used connection in the pool is used. Connections are destroyed by a separate thread when they are unused for a specified period, when there are more than a specified number of unused connections in the pool, or when the maximum number of connections has been reached and room must be made for new connections. You can specify the timeout period, the maximum number of managed connections, and the maximum number of unused connections.
public MQSimpleConnectionManager();
Constructs an MQSimpleConnectionManager.
public final static int
The pool is always active. On MQQueueManager.disconnect(), the underlying connection is pooled and can be reused the next time an MQQueueManager object is constructed. Connections are destroyed by a separate thread if they have been unused for longer then the timeout period or if the size of the pool exceeds the value set by setMaxUnusedConnections().
public final static int
An MQSimpleConnectionManager is active if it is the default connection manager and there is at least one connection in the pool.
This is the default.
public final static int
The pool is always inactive. The pool of connections is cleared on entering this mode. The connection underlying any active MQQueueManager objects is destroyed when MQQueueManager.disconnect() is called.
public Object allocateConnection(MQManagedConnectionFactory mcf, ConnectionRequestInfo cxRequestInfo) throws ResourceException;
Makes a connection to a queue manager, either by reusing an existing connection or by creating a new one. It is called by the connection factory instance of the resource adapter.
Normal applications should not call this method.
public Object createConnection(MQManagedConnectionFactory mcf, ConnectionRequestInfo cxRequestInfo) throws ResourceException;
Makes a connection to a queue manager. It is called by the connection factory instance of the resource adapter.
Normal applications should not call this method.
public int getActive();
Gets the active mode of the pool.
public int getHighThreshold();
public int getMaxConnections();
Gets the maximum number of connections.
public int getMaxUnusedConnections();
Gets the maximum number of unused connections in the pool.
public long getTimeout();
Gets the timeout value.
public Object recycleConnection(MQManagedConnectionFactory mcf, ConnectionRequestInfo cxRequestInfo);
Finds an existing connection to a queue manager. It is called by the connection factory instance of the resource adapter.
Normal applications should not call this method.
public void setActive(int mode);
Sets the active mode of the pool.
public void setHighThreshold(int limit);
public void setMaxConnections(int newLimit) throws IllegalArgumentException;
Sets the maximum number of connections.
public void setMaxUnusedConnections(int limit);
Sets the maximum number of unused connections in the pool.
public void setTimeout(long timeout);
Sets the timeout value.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzaw1358 |