"scott.stark(a)jboss.org" wrote : See the updated
org.jboss.test.kernel.deployment.support.container.* classes with BeanContainer, BeanPool,
etc.
|
This BeanPool class looks pretty broken:
| public synchronized T createBean()
| throws Throwable
| {
| if(pool.size() == 0)
| {
| // Fill the pool
| for(int n = 0; n < pool.size(); n ++)
| {
| T bean = (T) factory.createBean();
| pool.put(bean);
| }
| }
| return pool.take();
| }
|
The pool field is never instantiated - unless you're gonna do field injection.
And you have an if on size == 0, and then you iterate till size - which is 0.
OK, I know it's a test class. :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138182#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...