• Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Similar issues:
      KULRICE-3531Borrow broker from pool failed
      KULRICE-11871IT Failure PersonServiceImplTest.testLookupWithPersonJoin PBFactoryException: Borrow broker from pool failed, using PBKey
      KULRICE-377Revist thread pooling strategy
      KULRICE-9432Optimize code in ViewHelperServiceImpl
      KULRICE-7944Change view pooling to use a thread pool
      KULRICE-2673Optimize the RuleService.getDuplicateRuleId check
      KULRICE-10549Thread pool configuration and queueing algorithm
      KULRICE-6757KSPD: Investigate Optimization options for ViewServiceImpl
      KULRICE-7185Optimization of KIM Permission Checks
      KULRICE-14262Optimize Amazon RDS usage
    • Rice Module:
      Rice Core
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Contributing Institution:
      Michigan State Univ


      optimize the broker pool so it does not grab as many new brokers.

      This is brief description of the PersistenceBroker issue which we faced in MSU and fixed :
      Actaully there is a file called which is used while initializing the OJB configuration during the application start up.
      We have a property called maxActive which specifies the number of persistenceBrokers that are available at a point of time .
      Since we use OJB as ORM access to each db call is made through the PersistenceBroker object.
      Edocs in PURAP module like Requisition and recurring PREQS makes use of lot of PB objects eventually exceeding the max active count as a result this
      exception usually arises :
      org.springframework.dao.DataAccessResourceFailureException: Could not open OJB PersistenceBroker; nested exception is Borrow broker from pool failed, using PBKey jcdAlias=enWorkflowDataSource, user=null, password=null

      Caused by: Borrow broker from pool failed, using PBKey jcdAlias=enWorkflowDataSource, user=null, password=null




      at org.springmodules.orm.ojb.OjbFactoryUtils.getPersistenceBroker(

      at org.springmodules.orm.ojb.PersistenceBrokerTemplate.getPersistenceBroker(

      at org.springmodules.orm.ojb.PersistenceBrokerTemplate.execute(

      at org.springmodules.orm.ojb.PersistenceBrokerTemplate.getReportQueryIteratorByQuery(

      Caused by: java.util.NoSuchElementException

      at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(

      ... 160 more

      The above exception describes the pool maintained by PersistenceBrokerFactoryDefaultImpl the factory implementation which is responsible for
      maintaining the life cycle of PersistencBroker object is running out of objects since the limit is reached .

      When ever we make a call to DB for doing any operations the currently running thread checks whether it is bound to a Transaction Manager if it founds a transaction
      then from it tries to find the PB object bound to the current thread and releases it back to the pool after finishing , if it is not bound to any transaction manager
      then each operation to the DB borrows separate brokers and returns it to pool after it finishes.



          • Assignee:
            Bin Gao
          • Votes:
            0 Vote for this issue
            4 Start watching this issue


            • Created:

              Structure Helper Panel