4 Replies Latest reply on Jul 24, 2003 1:13 AM by frito

    configure multiple data sources (MySql)

    juanco29

      Hello. I have the following problem. I need to configure Jboss to work with two data bases (MySql). Create the archives mysqlDS1-service.xml and mysqlDS2-service.xml, for each data base. Jbosscmp-jdbc.xml for each EJB. creates the file But the application does not consult the data base. That other archives it is necessary to configure?

        • 1. Re: configure multiple data sources (MySql)
          frito

          What archives?
          You can use one xml for both configurations or deploy two conifguration xml files.
          Be sure you are using differen jndi names for the data sources.
          If you want to use cmp for ejbs (different ds for different ejbs) search the forum. I read something aout this recently.

          Greetings,
          Frito

          • 2. Re: configure multiple data sources (MySql)
            juanco29

            Thanks Frito. I already did what you said to me. When run the application, this one makes the connection to the source of data, makes deploy well, but it does not find the data that are stored in each source. That is the problem.

            • 3. Re: configure multiple data sources (MySql)
              juanco29

              These are the archives with which I am working (mysqlDS1-service.xml, mysqlDS2-service.xml, jbosscmp-jdbc.xml). But it does not work until the moment. When I review in http://localhost:8082, encounter mysqlDS1, mysqlDS2 in service=JNDIView. But when the application runs does not accede to the source of data, but if it stores to data in some tag temporary.

              • 4. Re: configure multiple data sources (MySql)
                frito

                Can you see the datasources in the JNDi view? If not, they are not deployed properly.

                Can you access the datasources? Try a testbean, do a lookup, get a connection and try to do a query.

                I think both should work with your configuration. If so, try to ask in the CMP forum since the datasources are ok.

                Greetings,
                Frito