3 Replies Latest reply on Oct 4, 2002 11:15 AM by joe

    JBoss 2.4.8 datasource pool size problem

    Kenneth Roper Newbie

      I've noticed a difference in behaviour with JBoss 2.4.7 and 2.4.8, which leads to the "No Managed Connections" error. (However, I think this is a different issue to the previously discussed difference in the default for the MaxSize variable.)

      I'm using the MVCSoft CMP engine, which has a configurable High-Low primary key generator. This uses a non-transactional datasource to perform a DB read and update the first time a Entity Bean of a given type is created in the DB. The datasource in question is configured like this:


      NonTransactionalDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl

      jdbc:sybase:Tds:myserver.com:4100
      myuser
      10
      XXXX
      false
      false
      false
      true
      120000
      1800000
      false
      true
      1.0
      0
      TRANSACTION_NONE


      In JBoss 2.4.7, under low loads this datasource happily operated using only 1 connection to my database. However, under JBoss 2.4.8 the datasource above holds on to its used connections to the database, meaning that now my application is using up to 10 connections to the DB under low loads -- and printing the "No Managed Connections" message when it tries to acquire number 11 (MaxSize being 10).

      Anyone have any ideas what's changed, and what I can do about it?

      Thanks
      Kenneth

        • 1. Re: JBoss 2.4.8 datasource pool size problem
          David Jencks Master

          Are you sure that you copied that right? it looks to me as if you have mixed two mbeans together.

          I rewrote a lot of the pooling code and some of XADataSourceImpl in 2.4.8 so it was somewhat thread safe and the pool hands out connections in order. I don't know why the behavior you are seeing would have changed. Does the mvcsoft code use autocommit??

          I thought the jdbcdatasourceloader mbean took a driver class as an attribute and don't know how it would work if given an XADataSource implementation.

          Are the connections being closed?

          • 2. Re: JBoss 2.4.8 datasource pool size problem
            Kenneth Roper Newbie

            David

            Which part of the descriptor seems wrong to you? Could you post an example of what you would consider a correct setup for a JDBCDatasource please? I based my config on the MVCSoft documentation, viewable here:

            http://www.mvcsoft.com/documentation/PersistenceManager11.pdf

            Specifically, page 77.

            Looking at the MVCSoft code, it doesn't change the autocommit setting. It just gets a connection from the datasource, uses it, and closes it in a finally block (it doesn't explicitly call conn.commit() though).

            Thanks
            Kenneth

            • 3. Re: JBoss 2.4.8 datasource pool size problem
              joe Newbie

              All,
              I'm getting the "No Managed Connections" error a well. My DataSource is geting bound properly. It is bound to the name my ejbs are looking for. Any clues anyone? I'm using 2.4.9.


              [INFO,org.jboss.jdbc.JDBCDataSourceLoader] Starting
              [DEBUG,org.jboss.pool.jdbc.JDBCConnectionFactory] Starting
              [DEBUG,org.jboss.pool.ObjectPool] Adding pool: ALCDataSource, GC enabled: false
              [INFO,org.jboss.jdbc.JDBCDataSourceLoader] JDBC Connection pool ALCDataSource bound to java:/ALCDataSource