2 Replies Latest reply on Apr 26, 2018 9:28 AM by Thomas Esche

    Understanding connection pooling

    Thomas Esche Newbie

      My own written teiid translator/connector pair, installed on Wildfly, seems to open ONE connection only. I opened several clients with different user names, but all are using the same connection although I defined "Shareable=false" in Wildfly.

      My standalone config-file allows up to 10 connections:

       

                      <pool>

                                      <min-pool-size>1</min-pool-size>

                                      <initial-pool-size>1</initial-pool-size>

                                      <max-pool-size>10</max-pool-size>

                      </pool>

       

      What could be the cause of this behaviour?

      Thanks in advance.

      Thomas

        • 1. Re: Understanding connection pooling
          Ramesh Reddy Master

          It depends on your resource-adapter (RA) implementation. The pools are smart to use single RA connection across various (Teiid) user queries, but in this scenario, they are using a single credential to the authenticate (if authentication is in play) to the data source. If you are looking at the different connection for different users i.e. credential flow, then you need to look into "securitydomain" definition on the resource-adapter. Depending upon the type of RA and authentication type it may be that you need handle certain parts of the passing of credentials in the RA.

           

          Ramesh..

          • 2. Re: Understanding connection pooling
            Thomas Esche Newbie

            Thanks again, Ramesh. I believe the security-domain does the job.

             

            I found that example and it seems to work for my resource adapter.

             

            <security-domain name="my-security-domain" cache-type="default">

                <authentication>

                    <login-module code="org.picketbox.datasource.security.CallerIdentityLoginModule" module="org.picketbox" flag="required">

                        <module-option name="password-stacking" value="useFirstPass"/>

                        <module-option name="userName" value="guest"/>

                        <module-option name="password" value="guest"/>

                    </login-module>

                </authentication>

            </security-domain>

             

            Regards,

            Thomas