1 Ответить Последний ответ: 20.10.2003 22:07, автор: 3004

    DB Connections not being released when using Weblogic Datasource

    3004
      I am using Kodo-JDO 2.5.3 and Weblogic 8.1.

      I have JDO running as a JCA connector and I have a simple stateless session
      bean persisting a simple object. My problem is that every time I call my
      session bean to persist an object it grabs a connection from the Weblogic
      connection pool and never returns it. So if I have configured a maximum of
      50 connections in the pool, on my 51st call to the session bean I will get
      an error saying it cannot acquire a connection from the pool. (error pasted
      below)

      I have configured my JDO parameters as follows:

      ConnectionRetainMode=persistence-manager (also tried 'transaction')
      TransactionMode=xa
      ConnectionFactoryName=ERDataSource
      ConnectionFactory2Name=NonXADataSource

      At the end of every call to the SessionBean I perform a
      persistenceManager.close(); and a persistenceManager=null;

      Any ideas why connections are not getting re-used?

      Exception I am receiving:

      java.sql.SQLException: Internal error: Cannot obtain XAConnection
      weblogic.common.resourcepool.ResourceLimitException: No resources currently
      available in pool MyJDBC Connection Pool-1 to allocate to applications,
      please increase the size of the pool and retry..
      at
      com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
      tions.java:64)
      at
      com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getSQLExecutionManag
      er(JDBCStoreManager.java:722)
      at
      com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.setPersistenceManage
      r(JDBCStoreManager.java:133)
      at
      com.solarmetric.kodo.runtime.PersistenceManagerImpl.initialize(PersistenceMa
      nagerImpl.java:173)
      at
      com.solarmetric.kodo.ee.EEPersistenceManager.initialize(EEPersistenceManager
      ..java:50)
      at
      com.solarmetric.kodo.impl.jdbc.ee.EEPersistenceManagerFactory.newPersistence
      Manager(EEPersistenceManagerFactory.java:107)
      at
      com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceMan
      ager(PersistenceManagerFactoryImpl.java:204)
      at
      com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceMan
      ager(PersistenceManagerFactoryImpl.java:136)
      at
      com.solarmetric.kodo.impl.jdbc.ee.JDOConnectionFactory.getPersistenceManager
      (JDOConnectionFactory.java:161)
      at
      com.mslv.osa.infrastructure.ossj.app.JVTSessionBean.getPersistenceManager(JV
      TSessionBean.java:308)
      at
      com.mslv.osa.infrastructure.system.app.SystemJVTSessionBean.createSystemProp
      erty(SystemJVTSessionBean.java:882)
      at
      com.mslv.osa.infrastructure.system.app.SystemJVTSessionBean_toe7tm_EOImpl.cr
      eateSystemProperty(SystemJVTSessionBean_toe7tm_EOImpl.java:1536)
      at
      com.mslv.osa.infrastructure.system.app.SystemJVTSessionBean_toe7tm_EOImpl_WL
      Skel.invoke(Unknown Source)
      at
      weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:407)
      at
      weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
      :108)
      at
      weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:356)
      at
      weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
      t.java:353)
      at
      weblogic.security.service.SecurityManager.runAs(SecurityManager.java:123)
      at
      weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:351)
      at
      weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
      0)
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

      Glen