1 Reply Latest reply on Oct 13, 2005 1:09 PM by ajaleo

    DataSource Type Independence

    ajaleo

      Hi all

      I've a important problem with the type of DataSource I use. If I want to deploy an ear with cmp in JBoss using MySQL I have to write in the deployment descriptor

      <datasource-mapping>mySQL</datasource-mapping>


      and I don't understand why is necessary to write here what kind of database will be used. In mysql-ds.xml I have already say it with the metadata field.

      <datasources>
       <local-tx-datasource>
       <jndi-name>/MyDataSource</jndi-name>
       <connection-url>jdbc:mysql://localhost:3306/jboss</connection-url>
       <driver-class>com.mysql.jdbc.Driver</driver-class>
       <user-name>qqqqq</user-name>
       <password>xxxxx</password>
       <metadata>
       <type-mapping>mySQL</type-mapping>
       </metadata>
       </local-tx-datasource>
      </datasources>
      



      Can anyone help me?

      I'd want to write only the DataSource jndi-name and JBoss should detect which type of type-mapping must use.

      Thanks!

        • 1. Re: DataSource Type Independence
          ajaleo

          I've been surfing in google and I've found a jboss-jdbc-metadata.sar. It seems that this service autodetect the metadata type in the datasource xml descriptor. However I haven't found that file in all the jboss-XXX.zip I've downloaded.

          Any suggestion?