1 Reply Latest reply on Jun 18, 2010 5:10 PM by dan.j.allen

    JBoss AS should provide additional default datasources by default.

    lincolnthree

      Glassfish uses "jdbc/__default" as their default DS name. I think it makes a lot of sense for us to do the same, in addition to providing "jdbc/DefaultDS", so that apps created on GlassFish using this sample datasource will also run on JBoss AS.

       

      This is a simple change that we can use to prevent things like needing the following config in our example apps this frequently trips up users.


            <!--
                  <jta-data-source>jdbc/__default</jta-data-source>
            -->
             <jta-data-source>java:/DefaultDS</jta-data-source>

       

      In summary, we should provide:

      • java:/DefaultDS
      • jdbc/__default
      • jdbc/sample

       

      It would be nice if we could get all AS vendors to standardize on the  default DS name. (Until then, we can increase our inbound compatability  by providing the above alternatives. WDYT?

       

      Thanks,

      --Lincoln

        • 1. Re: JBoss AS should provide additional default datasources by default.
          dan.j.allen

          +1. And to expand further, the main issue is that JBoss AS uses a proprietary JNDI name for the default datasource, making it such a pain for out of the box examples.

           

          Here's the data source definition that would do it. Notice the <use-java-context> is set to false.

           

          <datasources>
             <local-tx-datasource>
                <jndi-name>jdbc/__default</jndi-name>
                <use-java-context>false</use-java-context>
                <connection-url>jdbc:hsqldb:.</connection-url>
                <driver-class>org.hsqldb.jdbcDriver</driver-class>
                <user-name>sa</user-name>
                <password></password>
                <min-pool-size>5</min-pool-size>
                <max-pool-size>20</max-pool-size>
             </local-tx-datasource>
          </datasources>