[ 
https://issues.apache.org/jira/browse/POOL-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725400#action_12725400
 ] 

bhupesh bansal commented on POOL-146:
-------------------------------------

sure, 

I am using it as a Socket pool with the KeyedPoolableObjectFactory as a  
socketFactory which returns a socket for each makeObject() call
and close the socket in destroyObject() 

The Test scenario which causes issue is this: 
  Client --> socket call to server A and B (B is slow in freeing up resource 
where  A is fast to free)

  Common-Pools-1.5.1 : both A and B start throwing NoSuchElementException
  Common-Pools-1.4 :  only A throws NoSuchElementException and B keeps 
allocating resource. 

I am trying to write a test case for the same will attach it once m done. 

Best
Bhupesh



> Thread deadlock issue in GenericKeyedObjectPool borrowObject()
> --------------------------------------------------------------
>
>                 Key: POOL-146
>                 URL: https://issues.apache.org/jira/browse/POOL-146
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: bhupesh bansal
>
> I am a new user of common-pools and I was having some weird behavior with 
> GenericKeyedObjectPool
> GenericKeyedObjectPool: 1074:1077
>      public Object borrowObject(Object key) throws Exception {
>         long starttime = System.currentTimeMillis();
>         Latch latch = new Latch(key);     ---> This object is tried to be 
> used for managing pool size by calling wait()/notify() 
> My thinking is this should be a shared/global object and not created new for 
> each call ?? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to