1 Reply Latest reply on Oct 13, 2005 1:09 PM by Aitor Menta Segura

    DataSource Type Independence

    Aitor Menta Segura Newbie

      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!