2 Replies Latest reply on Jun 9, 2004 3:28 PM by ignacio cuesta

    dinamic <datasource> in jbosscmp-jdbc.xml

    ignacio cuesta Newbie

      hi everybody,

      I have a jbosscmp-jdbc.xml file with this piece of code
      <jbosscmp-jdbc>

      java:/skyline
      <datasource-mapping>MS SQLSERVER2000</datasource-mapping>

      .
      .
      </jbosscmp-jdbc>

      This xml is on EJBs.jar file.

      And mssql-ds.xml (on jboss_home/server/default/deploy) has these lines

      <local-tx-datasource>
      <jndi-name>skyline</jndi-name>
      <connection- url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=skyline3</connection-url>
      <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
      <user-name>skyline</user-name>
      skyline
      </local-tx-datasource>

      So, my client need to change dynamically the datasource for use a diferent database.
      The question is :
      Can I change dynamically the java:/skyline into the EJBs.jar file to work with other database ?
      Anybody give me some ideas to do that.
      Thank in advance !!!