JBoss Community

Re: Failed to acquire the pool semaphore in empty pool

created by Garry Dias in EJB3 - View the full discussion

Let me explain better...

 

It´s my stateless bean:

 


@Clustered
@Stateless(name = "MyWorkerBean")
@Pool(value = PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX, maxSize = 30)
public class MyWorkerBean implements WorkerInterface {
     public void sleep(boolean flag) throws Exception
     {
          Thread.sleep(60000);
     }
}

 

 

To stress this bean, I´m using a JMeter test case with 100 concurrent threads. Each thread perform a ejb lookUp for MyWorkerBean.

Each instance looked up performs a call to sleep() method. So, the first 30 lookups will perform and 70 will "Fail to aquire pool semaphore, strictTimeout=-1".

Now, I have 30 bean instances filling the pool for 60 seconds and the MBean for MyWorkerBean in jmx-console marks AvailableCount as 30.

After 60 seconds all 30 instances perform succesfully and I run 100 more jmeter threads, but this time all lookups blows with "Fail to aquire pool semaphore, strictTimeout=-1" and the MBean for MyWorkerBean in jmx-console marks AvailableCount as 0.

 

PS: the look up is performed by:

 

org.springframework.beans.factory.BeanFactory.getBean("MyWorkerBean")

 

 

Reply to this message by going to Community

Start a new discussion in EJB3 at Community