Hi all,

  I have doubts how to control when the pool, JCasPool, is exhausted.

  I'm trying something like this:

            JCasPool casPool = new JCasPool(100,
segmenter.getAnalysisEngineMetaData());

            ....

            if (cas == null) {
                synchronized (casPool) {
                    {
                        casPool.wait();
                        cas = casPool.getJCas();
                    }
                    while (cas == null);
                }
            }

 For release just: casPool.releaseJCas(cas);

 This is not working for me, because when there are a lot of requests the
application finally is blocked: the pool is full and never is released a
CAS.

Thanks,
  JM

Reply via email to