I'm leveraging the PooledGMService class - my application has a timeout set at 10 seconds - sometimes GM operations take longer (up to several minutes).
When this happens my Java process times out as expected and returns the connection to the pool. However, this does not cause the process to be destroyed and in fact the gm process can continue processing until it's complete. Calls to ensureHealthy() on a connection in this state block until the previous command has finished.
If I detect a timeout on a non pooled connection, the close() operation will destroy the process which will stop it from taking up processing resources as soon as my application has decided it will no longer wait for the result.
Basically I'd like the ability to flag a pooled connection as unhealthy. This way it won't be reused and if I have testOnReturn enabled the process will be destroyed when it's returned to the pool.
Are there any thoughts on how to approach this? I'm willing to do make the changes but wanted to see if there were any ideas on how to best implement it.
I'm leveraging the PooledGMService class - my application has a timeout set at 10 seconds - sometimes GM operations take longer (up to several minutes).
When this happens my Java process times out as expected and returns the connection to the pool. However, this does not cause the process to be destroyed and in fact the gm process can continue processing until it's complete. Calls to ensureHealthy() on a connection in this state block until the previous command has finished.
If I detect a timeout on a non pooled connection, the close() operation will destroy the process which will stop it from taking up processing resources as soon as my application has decided it will no longer wait for the result.
Basically I'd like the ability to flag a pooled connection as unhealthy. This way it won't be reused and if I have testOnReturn enabled the process will be destroyed when it's returned to the pool.
Are there any thoughts on how to approach this? I'm willing to do make the changes but wanted to see if there were any ideas on how to best implement it.