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:








      What could be the cause of this behaviour?

      Thanks in advance.


        • 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.



          • 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">


                    <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"/>