1 Reply Latest reply on Mar 8, 2006 4:57 AM by squishy

    Bean refuses to use custom datasource in jbosscmp-jdbc.xml

    squishy

      Hello,
      i wrote a very simple Entity Bean with a few cmp fields. I want the bean to store the fields in my postgreSQL database.
      I have put the postgres-ds.xml properly into the deploy folder with JNDI name PostgresDS.

      in jbosscmp-jdbc.xml i specified:

      <jbosscmp-jdbc>
       <defaults>
       <datasource>java:PostgresDS</datasource>
       <datasource-mapping>PostgreSQL 7.2</datasource-mapping>
       <create-table>true</create-table>
       </defaults>
       <enterprise-beans>
      
       <entity>
       <ejb-name>Cabin</ejb-name>
       <table-name>Cabin</table-name>
       <cmp-field>
       <field-name>shipId</field-name>
      .... etc .......
      


      But still the Bean uses the default JBoss database.
      What am i doing wrong?