6 Replies Latest reply on Mar 4, 2003 12:22 AM by abcode

    <table-name> instead of <ejb-name>

    dugu

      Whenever i use CMP to create a bean, it is created in the database using the name in <ejb-name> instead of the <table-name> in jbosscmp-jdbc.xml. How do i make it use the name in <table-name>?

        • 1. Re: <table-name> instead of <ejb-name>
          tdang

          which version of jboss do you use?

          The head of my jbosscmp-jdbc.xml (JBoss 3.0.1) file looks like this:


          java:/MyDBSource
          <datasource-mapping>DB2</datasource-mapping>
          <create-table>false</create-table>
          <remove-table>false</remove-table>
          <read-only>false</read-only>
          <pk-constraint>true</pk-constraint>
          <preferred-relation-mapping>foreign-key</preferred-relation-mapping>


          Compare it with yours.

          Hope it helps.

          • 2. Re: <table-name> instead of <ejb-name>
            dugu

            i'm using JBoss 3.0.1

            i commented out the entire block of the default element in jbosscmp-jdbc and move it to standardjbosscmp-jdbc.

            • 3. Re: <table-name> instead of <ejb-name>
              xbhatti

              Were you able to resolve the issue ?

              I'm having the same problem, I'm using 3.0.2, It was working fine for me on 3.0.1, maybe its related to some configuration, trying hard to see the differences.

              • 4. Re: <table-name> instead of <ejb-name>
                dugu

                No, still working on it. Some guys say its related to versions of JBoss.

                • 5. Re: <table-name> instead of <ejb-name>

                  Has anyone found a solution to this yet?

                  • 6. Re: <table-name> instead of <ejb-name>
                    abcode

                    I had a similar problem (could not set CMP table names with '@ejb.persistence table-name=""') because I had the following tag in my Bean class:

                    @jboss:container-configuration name="Standard CMP EntityBean"

                    It apparently over-rode a lot of the other tags I had in there. As soon as I took it out, everything worked fine.

                    -Alex