0 Replies Latest reply on Feb 18, 2004 6:54 PM by indygirl

    CMP Bean always refers to Default datasource

    indygirl

      I have a simple ejb; if work against the default DS then the application works; But i need to reference to another DataSource which is a postgresql db: I configured the datasource correctly and overwrote the jbosscmp-jdbc.xml in the application:


      <jbosscmp-jdbc>

      java:/PostgresDS
      <datasource-mapping>PostgreSQL 7.2</datasource-mapping>


      <enterprise-beans>


      <ejb-name>Address</ejb-name>
      <table-name>address</table-name>

      <cmp-field>
      <field-name>id</field-name>
      <column-name>id</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>name</column-name>

      </cmp-field>




      <ejb-name>Sequence</ejb-name>
      <table-name>SEQ_BLOCK</table-name>

      <cmp-field>
      <field-name>index</field-name>
      <column-name>idx</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>name</column-name>

      </cmp-field>



      </enterprise-beans>

      </jbosscmp-jdbc>




      What is the problem: Is it necessary to show each entity bean which datasource to use; why does it not reference the PostgresDS; instead takes the globally defined DefaultDS!