0 Replies Latest reply on Sep 5, 2014 8:37 AM by Ben Erridge

    Single Connection Pool for multiple Datasources

    Ben Erridge Newbie

      I am trying to get an application working on wildfy which works under glassfish and tomee but I am having difficulties figuring out how to configure multiple data-sources to use a single connection pool. Is this possible?

       

      with TomEE I just declared aliases in the

        <Resource id="Datasource-real" aliases="Datasource-alias1,Datasource-alias2,Datasource-alias3" type="DataSource">

              JdbcDriver  com.mysql.jdbc.Driver

              JdbcUrl jdbc:mysql://localhost:3306/mydb?zeroDateTimeBehavior=convertToNull

              UserName    **

              Password    **

          </Resource>

       

      I tried to do similar with aliases using the naming subsystem but either I am not doing it correctly or that doesn't work like I expect.

       

              <subsystem xmlns="urn:jboss:domain:naming:2.0">

                  <remote-naming/>

                  <bindings>

                      <lookup name="java:/Datasource-alias1" lookup="java:/Datasource-real" />

                      <lookup name="java:/Datasource-alias2" lookup="java:/Datasource-real" />

                      <lookup name="java:/Datasource-alias3" lookup="java:/Datasource-real" />

                  </bindings>

              </subsystem>

       

      I am new to WildFly.

      Thanks for any help.