1 Reply Latest reply on Oct 16, 2003 4:02 AM by prafullan

    CMP inserting to hsqldb

    johnurban Newbie

      Using 3.0.6

      I have a CMP bean that is configured via jbosscmp-jdbc to connect to java:/OracleDS. I have my oracle-service.xml file set to the jndi name of java:/OracleDS. When I run my ejb client, I connect to my JNDI server and lookup my bean.

      No matter what I do, I cannot get the record to add to the Oracle database. It adds it though just fine to the hsqldb database.

      What configuration file am I missing?

        • 1. Re: CMP inserting to hsqldb
          prafullan Newbie

          I had same problem connecting to other database other than Hypersonic with CMP . I used jboss-3.2.2RC4 ,and some configuration to get it working .

          1. In %JBOSS_HOME%\docs\examples\jca\ directory there is a xml file for oracle , oracle-ds.xml . Make changes in this file ,like hostname,sid ,user,password etc .

          2. Copy this file to deploy directory .Typically at %JBOSS_HOME%\server\default\deploy\

          3. In jbosscmp-jdbc.xml file located at META-INF\ of ejb add entry for Oracle datasource as follows :

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN"





          4. Compile the ejbs & package them to jar file . Then copy this jar file to deploy directory . Now CMP entity beans should be able to persists data to Oracle database .

          I have checked with SqlServer2000 . This should work with Oracle too . Assuming that all entries in ejb-jar.xml file are made properly .

          Give a try .Thanks benwalstrum for the idea .


          Prafullan .