7 Replies Latest reply on Jun 24, 2013 3:31 PM by Mohammad wrk

    Multi data source in JBoss AS ?

    Max Korn Newbie

      Hi all,

      I was wondering if it's possible to configure a multi-datasource in JBoss application server. I'd need this information for porting an existing Oracle Weblogic server application whch uses this feature.

      In a note contained in this post it's mentioned that the JBoss EAP can use multi datasources. Is it actually possible ?

      Thanks

      Max

        • 1. Re: Multi data source in JBoss AS ?
          Tomaz Cerar Master

          Hi,

           

          Jboss AS has always supported multiple datasources. AS7 is no different, you can define and use as many as you want.

           

          Take a look at https://docs.jboss.org/author/display/AS71/DataSource+configuration

           

           

           

          --

          tomaz

          • 2. Re: Multi data source in JBoss AS ?
            Max Korn Newbie

            Hi Tomaz,

            thanks for your kind reply.

            I'm not very much expert of Oracle Weblogic however a multi-datasource is (to my knowledge) an array of datasources which are load balanced by the application server. This can be useful as well to achieve HA if one of the datasource is not available. As this is a custom feature of Oracle WLS I'm afraid I cannot replicate as it is with JBoss AS. Maybe can you suggest me some workaround/clue  ?

            Thanks a lot

            Max

            • 3. Re: Multi data source in JBoss AS ?
              Nicklas Karlsson Master

              Glanced at the admin console and it has a configuration option for JNDI name so I guess you would want to export the JNDI and have JBoss connect to the WAS JNDI registry and use it from there. In theory.

              • 4. Re: Multi data source in JBoss AS ?
                Jesper Pedersen Master

                You are likely looking for the <url-delimiter> element in order to specify multiple connection urls, which will setup a "HA" pool; very basic implementation.

                 

                However, I would check with your DBAs - they should ideally provide you with a single point of access which handles replication, load-balancing, ... behind the scenes. That way you don't need the <url-delimiter> functionality.

                • 5. Re: Multi data source in JBoss AS ?
                  Max Korn Newbie

                  Thanks you all for the reply. Yes the url-delimiter parameter was what I was looking for, thanks. Even if as you suggested, maybe the most robust choice would be to provide an Oracle RAC endpoint address which transparentely routes the connections to the DBs.

                  Regards

                  Max

                  • 6. Re: Multi data source in JBoss AS ?
                    padster2012 Newbie

                    Hi I am trying to setup a failover to 2 Oracle 11g Database, I'm using JBOSS EAP 6 and have tried adding the url delimiter via the management console by adding in the property field . can you show me an example of domain.xml file with the url delimiter in it as .As my jboss doent seem to recognize the delmiter here's a copy of my domain.xml with datasources

                     

                    <connection-url>jdbc:oracle:thin:@IP:1521:sid|jdbc:oracle:thin:@IP:1521:sid</connection-url>
                    <connection-property name="url-delimiter">
                                                |
                                            </connection-property>

                     

                    • 7. Re: Multi data source in JBoss AS ?
                      Mohammad wrk Newbie

                      Jesper Pedersen wrote:

                       

                      You are likely looking for the <url-delimiter> element in order to specify multiple connection urls, which will setup a "HA" pool; very basic implementation.

                       

                      However, I would check with your DBAs - they should ideally provide you with a single point of access which handles replication, load-balancing, ... behind the scenes. That way you don't need the <url-delimiter> functionality.

                      Jasper: where can I find more info on configuring the HA specific features/attributes in EAP 6.X? Does this support both load balancing and failover?