3 Replies Latest reply on Oct 21, 2003 12:58 AM by nraghuram

    CMP INTEGRATED MYSQL DATABASE -urgent

    sajiv narayanan kartha Newbie

      Hi Everybody,

      I am new to JBOSS and to this forum. I have worked on Weblogic 6.1. I need help on CMP on jboss. What are the steps involved. Are there any more xml files to be added/edited/deleted.

      Its very urgent.... Kindly help me out....

      Sajiv, India.

        • 1. Re: CMP INTEGRATED MYSQL DATABASE -urgent
          nraghuram Newbie

          you need to add entries for your entity in jboss.xml, ejb-jar.xml and jbosscmp-jdbc.xml. check server/default/conf in your jboss folder

          • 2. Re: CMP INTEGRATED MYSQL DATABASE -urgent
            sajiv narayanan kartha Newbie

            Hi,

            What I wanted was a step by step guide to proceed for getting a cmp work..

            I am currently using jboss-3.2.1_tomcat-4.1.24. There are some xml files under the conf root in default folder.. What do I do with them..

            regards
            Sajiv

            • 3. Re: CMP INTEGRATED MYSQL DATABASE -urgent
              nraghuram Newbie


              Basic entries in the jboss.xml and jbosscmp-jdbc.xml files for example.

              <enforce-ejb-restrictions>false</enforce-ejb-restrictions>
              <resource-managers>
              <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
              <res-name>OracleDS</res-name>
              <res-jndi-name>java:/OracleDS</res-jndi-name>
              </resource-manager>
              </resource-managers>

              <enterprise-beans>

              <ejb-name>CUSTOMER</ejb-name>
              <jndi-name>customer.CustomerEntityHome</jndi-name>
              <local-jndi-name>claim.ClaimToPublisherProductEntityHome</local-jndi-name>
              <configuration-name>Standard CMP 2.x Entity Bean</configuration-name>
              <resource-ref>
              <res-ref-name>jdbc/OracleDS</res-ref-name>
              <resource-name>OracleDS</resource-name>
              </resource-ref>

              </enterprise-beans>



              A basic entry in the jbosscmp-jdbc.xml file
              <jbosscmp-jdbc>


              java:/OracleDS
              <datasource-mapping>Oracle8</datasource-mapping>
              <create-table>false</create-table>
              <remove-table>false</remove-table>
              <read-only>false</read-only>
              <pk-constraint>true</pk-constraint>
              <fk-constraint>false</fk-constraint>
              <read-ahead>
              on-load
              <page-size>255</page-size>
              <eager-load-group>*</eager-load-group>
              </read-ahead>


              <enterprise-beans>

              <ejb-name>CUSTOMER</ejb-name>
              <table-name>CUSTOMER</table-name>
              <cmp-field>
              <field-name>customerId</field-name>
              <column-name>CUSTOMER_ID</column-name>
              </cmp-field>
              <cmp-field>
              <field-name>customerName</field-name>
              <column-name>CUSTOMER_NAME</column-name>
              </cmp-field>

              <cmp-field>
              <field-name>creationBy</field-name>
              <column-name>CREATION_BY</column-name>
              </cmp-field>
              <cmp-field>
              <field-name>creationDate</field-name>
              <column-name>CREATION_DATE</column-name>
              </cmp-field>
              <cmp-field>
              <field-name>lastUpdateBy</field-name>
              <column-name>LAST_UPDATE_BY</column-name>
              </cmp-field>
              <cmp-field>
              <field-name>lastUpdateDate</field-name>
              <column-name>LAST_UPDATE_DATE</column-name>
              </cmp-field>



              </enterprise-beans>

              </jbosscmp-jdbc>


              If you need step by step instructions on how to deploy an application in jboss thats for a different forum.
              raghu