7 Replies Latest reply on Jul 14, 2002 4:21 AM by navneet

    CMP with MySQL doesn't run

    bertolod

      Hello

      first, I have read a lot of post on this forum and I'm searching for 2 years ago.


      I'm trying to use MySQL to CMP for entity bean

      I modify server/default/conf/standardjbosscmp-jdbc.xml:


      java:/MySqlDS
      <datasource-mapping>mySQL</datasource-mapping>

      and I modify ConnectionURL, UserName and Password in
      docs/examples/jca/mysql-service.xml:

      MySqlDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/test</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">toto</config-property>
      <config-property name="Password" type="java.lang.String">toto</config-property>





      and put this file in server/default/deploy/

      I don't modify anything else and jboss continue to use default DataBase to CMP even if i restart jboss server.


      Can someone help me please ???

      David

        • 1. Re: CMP with MySQL doesn't run
          bertolod

          Precisions:

          I'm using:
          - Linux Mandrake8.1
          - JBOSS3.0
          - NetBeans

          and entity bean example found on sourceforge CVS tree

          That's all

          Thanks

          David

          • 2. Re: CMP with MySQL doesn't run
            zuludancer

            Hi bertolod,

            for JBoss3.0 and CMP 2.0 you have to configure jbosscmp-jdbc.xml.

            You might get the docs at:

            http://www.jboss.org/docs/

            • 3. Re: CMP with MySQL doesn't run
              bertolod

              Hello zuludancer

              I 've seen the online doc (JBoss2.4) and I've read the doc for JBoss 3.0.
              I found example for entity bean but nothing for configure CMP.
              I found on this forum some post, and I 've already modify this file : standardjbosscmp-jdbc.xml and
              this file : mysql-service.xml
              (In my first post, I show my modification of this file)

              but I've tried again tio change something and JBOSS don't want use MySQL to CMP. (even if it's ok with BMP)

              I always need help.

              thanks

              David

              • 4. All I need is help !!!!  tadatadadadam ...
                bertolod

                please
                someone
                I can do a lot of..
                heum

                just please

                David

                • 5. Re: CMP with MySQL doesn't run
                  giough

                  You probably need to buy the CMP docs at flashline.com. Do a search for jboss on the site to find it.

                  The latest docs are dated last month. I think it's worth the ten bucks I spent.

                  Obviously, the docs are for cmp2.0 and jboss3

                  Good luck.

                  • 6. Re: CMP with MySQL doesn't run
                    navneet

                    Hi bertolod,

                    I am using mysql adn jboss 3.0.0RC3 on windows 2000 machine and it is working fine.

                    here is what i had to do:

                    -set mysql to use innodb tables as they support transaction
                    -changed the connectionurl in mysql-service.xml to jdbc:mysql://localhost:3306/DBName
                    -included the following in login-config.xml

                    -------------------
                    <!-- Security domain for Mysql -->
                    <application-policy name = "MySqlDbRealm">

                    <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
                    <module-option name = "principal">secret</module-option>
                    <module-option name = "userName">secret</module-option>
                    <module-option name = "password">secret</module-option>
                    <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
                    </login-module>

                    </application-policy>
                    -------------------
                    -changed standandjbosscmp-jdbc.xml and standardjaws.xml to use java:/MySqlDS datasource and mySQL datasource-mapping
                    -copied the mysql-service to deploy folder

                    and its working for me

                    • 7. Re: CMP with MySQL doesn't run
                      navneet

                      Hi bertolod,

                      I am using mysql adn jboss 3.0.0RC3 on windows 2000 machine and it is working fine.

                      here is what i had to do:

                      -set mysql to use innodb tables as they support transaction
                      -changed the connectionurl in mysql-service.xml to jdbc:mysql://localhost:3306/DBName
                      -included the following in login-config.xml

                      -------------------
                      <!-- Security domain for Mysql -->
                      <application-policy name = "MySqlDbRealm">

                      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
                      <module-option name = "principal">secret</module-option>
                      <module-option name = "userName">secret</module-option>
                      <module-option name = "password">secret</module-option>
                      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
                      </login-module>

                      </application-policy>
                      -------------------
                      -changed standandjbosscmp-jdbc.xml and standardjaws.xml to use java:/MySqlDS datasource and mySQL datasource-mapping
                      -copied the mysql-service to deploy folder

                      and its working for me