3 Replies Latest reply on Oct 31, 2002 2:32 AM by pvamstel

    Setting up multiple mySQL databases underneath JBoss3

    davout

      I'm a JBoss/EJB newbie... so I would be very grateful if somebody could help me with some 'idiot' level instructions on how to setup multiple mySQL databases under JBoss3 for CMP2.0 entity beans. (I'm using JBuilder7 as my IDE)

      To date I've copied the 'mysql-service.xml' file into the 'server/default/deploy/' folder and set this config file so that it points at a specific mySQL database 'test01', like...



      <config-property name="ConnectionURL"
      type="java.lang.String">
      jdbc:mysql://localhost:3306/test01
      </config-property>

      Now I have another prototype bean I have developed that exists in a second mySQL database called 'test02'.

      How and where do I define the link to this second database?


        • 1. Re: Setting up multiple mySQL databases underneath JBoss3
          pvamstel

          Alreadu answered in another forum

          • 2. Re: Setting up multiple mySQL databases underneath JBoss3
            davout

            Again only a partial reply!

            Perhaps there is a certain level of experience assumed by the replying author. I for one find the multitude of different XML files extremely confusing!

            As it happens I have received a detailed comprehensive reply from another source.

            I'll be posting the outcome in the FAQ section.

            • 3. Re: Setting up multiple mySQL databases underneath JBoss3
              pvamstel

              Maybe you are write that it is confusing.
              For me as well.

              But i'm not a total newbe anymore. It has to do with cmp2 that needs a default mapping to tables and columns. This is done in the j2ee file called ?????.
              But after that the tables and column defenitions are not tied to a database. This is done in the jdbc-cmp2.xml (Not the correct name but you know ehich one).
              This connection is only a jndi name. This jndi name is tied to a real database in the mysql ... service.xml.

              This is how i understand the cmp2 stuff.

              grt Patrick