6 Replies Latest reply on Oct 26, 2005 5:43 PM by Bela Ban

    [1.2.4] JDBCCacheLoader errors when using ManagedConnections

    Hubert Iwaniuk Newbie

      Hi,

      My setup:
      Singleton MDB uses persistent (JDBCCacheLoader) cache.
      Associated DS min/max-pool-size is 1.
      So only one connection should be present at any time.

      I've lowered DS poll size to see problem clearly, it occures with larger pools too.

      The error I get:

      [26.10.2005|02:40:17:764] [JMS SessionPool Worker-0] [org.jboss.jms.asf.StdServerSession] [onMessage] [ERROR] [354] : failed to commit/rollback
      org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=stasio/21, BranchQual=, localId=21] status=STATUS_NO_TRANSACTION; - nested throwable: (org.jboss.util.Nest
      edRuntimeException: ; - nested throwable: (java.lang.IllegalStateException: Failed to get connection: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax
      .resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))))
       at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:344)
       at org.jboss.tm.TxManager.commit(TxManager.java:200)
       at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:341)
       at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
       at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
       at org.jboss.mq.SpySession.run(SpySession.java:333)
       at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
       at java.lang.Thread.run(Thread.java:534)
      Caused by: org.jboss.util.NestedRuntimeException: ; - nested throwable: (java.lang.IllegalStateException: Failed to get connection: No ManagedConnections available within configured blocking timeout ( 30000 [ms]
       ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )))
       at org.jboss.cache.interceptors.CacheStoreInterceptor$SynchronizationHandler.beforeCompletion(CacheStoreInterceptor.java:232)
       at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1384)
       at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1076)
       at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:296)
       ... 8 more
      Caused by: java.lang.IllegalStateException: Failed to get connection: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No
      ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
       at org.jboss.cache.loader.JDBCCacheLoader$ManagedConnectionFactory.prepare(JDBCCacheLoader.java:1513)
       at org.jboss.cache.loader.JDBCCacheLoader.prepare(JDBCCacheLoader.java:504)
       at org.jboss.cache.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:140)
       at org.jboss.cache.interceptors.CacheStoreInterceptor.access$000(CacheStoreInterceptor.java:23)
       at org.jboss.cache.interceptors.CacheStoreInterceptor$SynchronizationHandler.beforeCompletion(CacheStoreInterceptor.java:218)
       ... 11 more
      


      For me it looks like JDBCCacheLoader "Owns housekeeping", so it doesn't
      release connections.

      If I'm getting something wrong, please give me some pointers to use persistent cache properly.

      Thanks in advance,
      Hubert.