1 Reply Latest reply on Mar 1, 2002 6:29 AM by russell

    Deploy CMPs on different tables in MySQL

    Mikael HOUDU Newbie

      Hi,

      I have configure my JBoss 2.4.4 with mySQL.
      My defaultDB is mySQL with the database "firstDB".
      All works perfectly.
      My CMPs are in a database called "firstDB".

      But now, I want to have some CMPs in "firstDB" and others in "secondDB". These 2 DB are in mySQL.

      How can I do ?
      I don't know where I should specify the name of my DB for the deployment of my CMPs.

      Help me, thanks

        • 1. Re: Deploy CMPs on different tables in MySQL
          russell Newbie

          You need to edit jaws.xml and add tags to each of your CMP beans. But first you need to define the 2 different datasources in jboss.jcml to point to firstDB and secondDB.

          <entity-bean>
          <ejb-name>first</ejb-name>
          firstDB
          ...
          </entity-bean>

          <entity-bean>
          <ejb-name>second</ejb-name>
          secondDB
          ...
          </entity-bean>

          > Hi,
          >
          > I have configure my JBoss 2.4.4 with mySQL.
          > My defaultDB is mySQL with the database "firstDB".
          > All works perfectly.
          > My CMPs are in a database called "firstDB".
          >
          > But now, I want to have some CMPs in "firstDB" and
          > others in "secondDB". These 2 DB are in mySQL.
          >
          > How can I do ?
          > I don't know where I should specify the name of my DB
          > for the deployment of my CMPs.
          >
          > Help me, thanks