Example usage for org.apache.commons.pool2 ObjectPool invalidateObject

List of usage examples for org.apache.commons.pool2 ObjectPool invalidateObject

Introduction

In this page you can find the example usage for org.apache.commons.pool2 ObjectPool invalidateObject.

Prototype

void invalidateObject(T obj) throws Exception;

Source Link

Document

Invalidates an object from the pool.

Usage

From source file:com.mirth.connect.connectors.file.FileConnector.java

/**
 * Permanently destroy a connection.//from   www  . j a va2 s.  c  o m
 * 
 * @param uri
 *            The URI of the endpoint from which the connection is being released.
 * @param connection
 *            The connection that is to be destroyed.
 * @param message
 *            ??
 * @throws Exception
 */
protected void destroyConnection(FileSystemConnection connection, FileSystemConnectionOptions fileSystemOptions)
        throws Exception {
    if (connection != null) {
        ObjectPool<FileSystemConnection> pool = getConnectionPool(fileSystemOptions);
        pool.invalidateObject(connection);
    }
}