3 Replies Latest reply on Mar 28, 2013 10:04 AM by jesper.pedersen

    Avoiding connection pooling in JBoss 7.1.1.-Final

    tinche

      Hi,

       

      we're using pgpool for pooling and load balancing. Pgpool's load balancing is session-based, so in order to get load balanced queries  we either have to do a lot in parallel or close the JDBC connections after each request.

       

      First question: can I disable JDBC connection pooling, and ensure every connection is physically closed after it's used?

       

      Since cursory Googling didn't turn up anything useful, I'm going to assume doing this isn't easy.

       

      Second question: another thing that would work for me is if the pool were to hand out connections in a round-robin fashion. The default pool implementation (SemaphoreArrayListManagedConnectionPool) doesn't do this. I see there's another implementation of the same interface in IronJacamar (ArrayBlockingQueueManagedConnectionPool) that does. If there any way I can get my data source to use this pool implementation?

       

      Thanks in advance.

        • 1. Re: Avoiding connection pooling in JBoss 7.1.1.-Final
          jesper.pedersen

          we're using pgpool for pooling and load balancing. Pgpool's load balancing is session-based, so in order to get load balanced queries  we either have to do a lot in parallel or close the JDBC connections after each request.

           

          First question: can I disable JDBC connection pooling, and ensure every connection is physically closed after it's used?

           

          Using external an connection pool like pgpool is something I want look at supporting in IronJacamar 2.There is currently no standard way of forcing a close, but you could look at using a special valid connection checker implementation and see if that would work for you...

           

          Second question: another thing that would work for me is if the pool were to hand out connections in a round-robin fashion. The default pool implementation (SemaphoreArrayListManagedConnectionPool) doesn't do this. I see there's another implementation of the same interface in IronJacamar (ArrayBlockingQueueManagedConnectionPool) that does. If there any way I can get my data source to use this pool implementation?

          That is JBJCA-1005 - so you can pick up a nightly snapshot and get that fix. ArrayBlockingQueueManagedConnectionPool is still considered experimental.

          • 2. Re: Avoiding connection pooling in JBoss 7.1.1.-Final
            tinche

            Thanks for the reply, Jesper.

             

            Just out of curiosity, did JBJCA-1005 (i.e. Iron Jacamar 1.0.16.Final) make it to EAP 6.1 Alpha?

            • 3. Re: Avoiding connection pooling in JBoss 7.1.1.-Final
              jesper.pedersen

              No, look for it in the next EAP release - standard caveats as I work upstream, and don't control product roadmaps.

              1 of 1 people found this helpful