2 Replies Latest reply on Nov 28, 2002 12:25 PM by dnoyeb

    jaws.xml datasource ignored!?

    dnoyeb

      I am using mysql and JBoss 3.x.

      The problem is I can only have 1 datasource. Whatever is in

      standardjbosscmp-jdbc.xml
      and
      standardjaws.xml

      is what JBOSS is using, regardless to what I put in jaws.xml in my jarfile.

      Plus what if I wanted different CMP EJBs in different databases? Its only allowing one datasource so I am stuck.

      This is CMP so I am not getting the database myself. Point is, jaws.xml datasource is being ignored.

      Test2DS is not even being attempted. it sticks with what I put in the files listed above TestDS. No errors are indicated.

      jaws.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jaws PUBLIC "-//JBoss//DTD JAWS 2.4//EN" "http://www.jboss.org/j2ee/dtd/jaws_2_4.dtd">


      java:/Test2DS
      <type-mapping>mySQL</type-mapping>
      false

      <enterprise-beans>


      <ejb-name>Branch</ejb-name>
      <cmp-field>
      <field-name>branchID</field-name>
      <column-name>branchID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>name</column-name>
      </cmp-field>

      <table-name>branch</table-name>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      <tuned-updates>true</tuned-updates>
      <read-only>false</read-only>

      </enterprise-beans>

        • 1. Re: jaws.xml datasource ignored!?
          dnoyeb

          does my manifest file have to contain anything related to the jaws.xml file? does it have to be listed inside?

          • 2. Re: jaws.xml datasource ignored!?
            dnoyeb

            the problem was with xdoclet. Or rather with me.



            Without that last line the version defaults to 2.4. And with 2.4 xdoclet does not generate a

            jbosscmp-jdbc.xml

            file to go in my jar. With that file added all is well!!!

            So for all those who have problems configuring JBoss with mySQL using xdoclet and CMP for a datasource other than DefaultDS in 3.0 (blatant webcrawler plug), the answer is to configure this extra file that is not used in 2.4.