3 Replies Latest reply on Nov 10, 2003 9:38 AM by luke_t

    <datasource-mapping> is badly designed

    adrianp1

      Sorry about the title, just needed to grab someone's attention.

      The binding of a data source to a particular JDBC driver/user/pwd/dbserver (and thus to a particular database type) is the responsibility of the bean deployer not the bean provider, so logically it ought to be possible to specify the mapping in the *-ds.xml datasource configuration file?

      As it is, jbosscmp-jdbc*.dtd requires the bean provider to specify and <datasource-mapping> as a pair in and/or , the defaults being "java:/DefaultDS" and "Hypersonic SQL" respectively. This is a bad design because it makes it impossible for a bean provider to distribute an ejb.jar or j2ee.ear file that supports multiple databases, without requiring the deployer to rip open the archive and mess with the deployment descriptors (a tricky and error prone procedure sensible providers wish to avoid at all costs).

      Thanks,

      Adrian Price

        • 1. Re: <datasource-mapping> is badly designed
          roomy

          Hi everybody,
          this is NOT a reply.... sorry for that, but

          I AM 100% BEHIND YOU !!!!!

          it should be possible to specify the mapping in the DS file.

          We got several configurations JBOSS<->Databases with vendors from different Databases (Oracle 8,9, Interbase, etc.).
          Its completely annoying that we have to specify the mapping in our EAR Files in a JBoss_CMP.... file.
          It complicates the assembly.

          PLEASE... change that.

          Volker

          • 2. Re: <datasource-mapping> is badly designed

            Post it as a RFE on sourceforge.

            -- Juha

            • 3. Re: <datasource-mapping> is badly designed

              You can also just rely on the default settings in standardjbosscmp-jdbc.xml. It's often more convenient to change these and this is a viable approach if your all your CMP beans in one JBoss instance are deployed to a single database.

              Luke.