3 Replies Latest reply on May 21, 2002 11:42 AM by ben1

    Muliple datasources in jaws.xml

    banigreyling

      Hi,

      When you deploy a couple of CMP beans, you usually use something like the following in jaws.xml:

      <?xml version="1.0" encoding="Cp1252"?>
      <jaws>
       <datasource>java:/Billing</datasource> <<== NOTE
       <type-mapping>MS SQLSERVER</type-mapping>
       ....
      


      If, however, I want to deploy multiple beans in the same JAR that use different datasources, how must I specify the datasource for each bean? I tried something like the following, but JAWS ignored it.

      <enterprise-beans>
       <entity>
       <ejb-name>PostalCode</ejb-name>
       <datasource>java:/Billing</datasource> <<== NOTE
       <table-name>dbo.PostalCode</table-name>
       <create-table>false</create-table>
       ...
      


      Alternatively I could deploy Beans using the same datasource in there own JAR, but this would be second prize :)

      Any suggestions?

      Thx
      Bani

        • 1. Re: Muliple datasources in jaws.xml
          davidjencks

          I think this ability was added to jaws for 2.4 sometime this summer, although I don't know the xml tag you need. Check the dtd and if that doesn't work you might try scanning the dev mailing list. You can't do what you want in 2.2.

          • 2. Re: Muliple datasources in jaws.xml
            ceyhun_ozgun

            It does not seem to be fixed in 2.4.x versions.
            For now, I am using multiple jar files for this reason.
            It would be a nice feature.

            • 3. Re: Muliple datasources in jaws.xml
              ben1

              ceyhun_ozgun: You are using multiple jar files? Do they each have their own jaws.xml? If so, are they looking at different datasources? I am having trouble setting up multiple jar files looking at different datasources. One uses the standardjaws.xml and no jaws.xml. The other is supposed to use the jaws.xml it contains, but JBoss doesn't appear to see it?
              Can you give me some insight?
              I appreciate any help.
              Thanks
              Ben