SshClient.disconnect and SftpClient.quit has to invoked to close the transport channels.
The below points has solved my problem.
1.The most important thing when using mavericks with apache commons pool is invoking proper life cycle method.
2.Encapsulation of SshClient and SftpClient into Object that is under the pool.
SshClient and SftpClient has to be the instance member of the object that is under the pool.So that destroyObject method of BaseKeyedObjectPoolableFactory is implemented with objects quit and disconnect.
class SFTPConnection{
private SshClient sshClient;
private SftpClient sftpClient;
------
public void destroyObject(){
sshClient.disconnect();
sftpClient.quit()
}
class SFTPConnectionFactory extends BaseKeyedObjectPoolableFactory{
----
public void destroyObject(Object Key,Object arg){
SFTPConnection sftpConnection = (SFTPConnection)arg;
sftpConnection.destroyObject():
}
}