9 Replies Latest reply on Apr 10, 2002 8:16 AM by vmweb

    CMP and Oracle configuration

    vmweb

      Hi.

      I'm trying to setup Jboss 3.0.0alpha with a CMP entity bean but it always use the DefaultDS instead fo OracleDS that I've setup.

      I did the following:

      1. created a oracle-service.xml in the deploy directory
      2. created the jaws.xml and jbosscmp-jdbc.xml in the META-INF dir of my ejb jar.

      I've the java:/OracleDS bound in the JNDI (I've made a session bean and tried to get a connection and it worked), but the problem is that according to the log file JBoss always try to get a connection from the DefaultDS and not OracleDS.

      Anyone had this problem? Any help would be appreciate.

      Thanks in advance.

      Oliveira

        • 1. Re: CMP and Oracle configuration

          > 2. created the jaws.xml and jbosscmp-jdbc.xml in the META-INF dir of my ejb jar.

          Hi

          What do you have in your jbosscmp-jdbc.xml?
          Have you set the datasource correctly in there?

          Luke.

          • 2. Re: CMP and Oracle configuration
            vmweb

            Hi,

            my jbosscmp-jdbc.xml has the following:

            <jbosscmp-jdbc>

            java:/OracleDS
            <type-mapping>Oracle8</type-mapping>
            true
            <create-table>false</create-table>
            <remove-table>false</remove-table>
            <read-only>false</read-only>
            <time-out>300</time-out>
            <select-for-update>false</select-for-update>
            <preferred-relation-mapping>foreign-key</preferred-relation-mapping>

            </jbosscmp-jdbc>

            It looks like the settings in this file are ignored.

            • 3. Re: CMP and Oracle configuration

              Have you checked the debug output from the server log file to see that it is loading your jbosscmp-jdbc file and overriding the default settings?

              Luke.

              • 4. Re: CMP and Oracle configuration
                vmweb

                the server log didn't said that my properties were override, but when I added the DOCTYPE in the jboss-cmp-jdbc.xml the properties were overridden (and the log said it too).

                I did the same in the jaws.xml but it didn't worked. I'll try to figure out what is happening.

                Thanks for your reply

                • 5. Re: CMP and Oracle configuration

                  Why have you got a jaws.xml file in there as well - I didn't think it was relevant for the CMP 2 engine?

                  Luke.

                  • 6. Re: CMP and Oracle configuration
                    alice_adler01

                    I had a problem with configuring Oracle with JBoss 3.0alpha and then I switched to JBoss 3.0beta and it worked fine w/o any changes in conf files.

                    • 7. Re: CMP and Oracle configuration
                      vmweb

                      Hi Luke,

                      I guess that the holiday was good for my brain. You are right, I was putting the configuration in jaws.xml instead of jbosscmp-jdbc.xml.

                      Now everything is up and running. Thanks again for your information.

                      • 8. Re: CMP and Oracle configuration
                        jacktr

                        hi
                        now that you solved the problem i have 2 questions: did you make any changes to the standardjbosscmp-jdbc.xml in the conf directry of jboss? my problem is, that jboss seems to ignore the standardjbosscmp-jdbc.xml in my META-INF directory.
                        could you help me??

                        • 9. Re: CMP and Oracle configuration
                          vmweb

                          Hi,

                          After greping the source code I've noticed that jboss check the DOCTYPE tag in the jboss-cmpjdbc.xml file.
                          So I added the following DOCTYPE declaration:

                          <!DOCTYPE jbosscmp-jdbc PUBLIC
                          "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN"
                          "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd">

                          And jboss started to read my configuration. Just pay attention to the spelling.

                          I didn't changed anything in the standardjbosscmp-jdbc.xml that is located in the conf/default directory.

                          Hope this help