1 Reply Latest reply on Jul 17, 2004 4:09 AM by aloubyansky

    Switching datasource-mappings at install time

    murguia

      I'm porting a system from MySQL to Oracle and MS SQL. Which DB to use is an install time option.

      This would entail changing the datasource-mapping in the jbosscmp-jdbc.xml at install time. But that file is in the meta-inf in the ejb.jar that is built. I could explode the jar & change the datasource & datasource-mapping strings, but that seems really hokey.

      We also use Hypersonic & I can't change the default DS.

      Is there some slick way to specify the mappings at the EJB level that I completely missed?

      I'm using JBoss 3.2.1.

        • 1. Re: Switching datasource-mappings at install time
          aloubyansky

          The only thing you could do is to use DataSource delegator service. Which implements DataSource interface but delegates invocations to some target DataSource, say OracleDS. At runtime you could change the target to say MsSqlDS. But there is not way to change CMP type-mapping in the current version.