5 Replies Latest reply on Aug 9, 2006 3:00 AM by kvak_tnt

    jBPM BPEL change DB - HowTo?

    kvak_tnt

      Hi there!

      I have installed the jBPM BPEL beta1 (and also downloaded the CVS - but so it is clearer which version I'm running)

      I'm using
      * Eclipse 3.1.2F
      * JBOSS 4.0.4GA
      * jBPM 3.1.1 (included)
      * jBPM BPEL beta 1
      * MySQL 5.0


      I want to change the standard Database connection from Hybersonic-in-Jboss-Database (which I cannot verify and handle from outside) to a MySQL Database.
      I tried different settings and found also some posts (like this: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=74798)
      but It won't work.

      Can someone give me a HowTo configure my Database connection to MySQL?


      If someone could help me - this would be great!
      Thanks in advance!

      Greetings

      Claus

        • 1. Re: jBPM BPEL change DB - HowTo?
          kvak_tnt

          P.S. Also MSSQL would be possible... Everything is available :-)

          • 2. Re: jBPM BPEL change DB - HowTo?
            fwshk

            Hi Claus,

            Thanks for trying my previous post. May be my previous post is not well organized. However, I make a updated version for MySQL. In facts, I haven't been used MSSQL.

            My Configure:
            - jbpm-bpel-1.1-beta1
            - jboss-4.0.4.GA
            - mysql-5.0.21
            - mysql-connector-java-5.0.0-beta

            1. Edit JBPM_HOME\build.properties

            jboss.home=D:/Try/jboss-4.0.4.GA
            jbpm.bpel.version=1.1-beta1
            jbpm.version=3.1.1


            2. Edit JBPM_HOME\src\resources\jbpm-bpel.sar\hibernate.properties
            hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
            hibernate.connection.datasource=java:/jbpmBpelDS
            hibernate.show_sql=true
            hibernate.query.substitutions=true 1, false 0
            hibernate.hbm2ddl.auto=update

            Notice:
            - Datasource name is case sentience
            - doankhoavy talk about use "create" rather than "update"

            3. Edit JBPM_HOME\src\resources\jbpm-bpel.sar\jbpm-bpel-ds.xml
            <?xml version="1.0" encoding="UTF-8"?>
            <datasources>
             <local-tx-datasource>
             <jndi-name>jbpmBpelDS</jndi-name>
             <connection-url>jdbc:mysql://localhost/jbpmBpel</connection-url>
             <driver-class>com.mysql.jdbc.Driver</driver-class>
             <user-name>root</user-name>
             <password></password>
             <min-pool-size>5</min-pool-size>
             <max-pool-size>20</max-pool-size>
             <idle-timeout-minutes>0</idle-timeout-minutes>
             <track-statements />
             <metadata>
             <type-mapping>MySQL</type-mapping>
             </metadata>
             </local-tx-datasource>
            </datasources>


            4. Execute command
            CD JBPM_HOME
            ANT build.service.404


            5. Copy JBPM_HOME\build\jbpm-bpel.sar to JBOSS\service\default\deploy
            Notice:
            - Place into your server instead of default server

            6. Copy MySQL Driver into JBOSS\service\default\lib
            Notice:
            - Place into your server instead of default server

            7. Before start JBoss:
            - Please confirm that your MySQL is running
            - The database is existing in your MySQL
            - The user is able to access the database

            8. Start your JBoss

            Wish it is helpful for you and I am welcome for point out my mistake.

            Roy

            • 3. Re: jBPM BPEL change DB - HowTo?
              aguizar

              Excellent guide! I can only add that, if you don't want automatic database schema creation (as is most often the case in a production environment) you should remove this line from your hibernate.properties:

              hibernate.hbm2ddl.auto=update

              Instead, execute the following commands after you deploy jbpm-bpel.sar:
              cd JBPM_HOME/doc/examples
              ant create-schema

              Enjoy!

              • 4. Re: jBPM BPEL change DB - HowTo?
                kvak_tnt

                Thanks for the hints!

                • 5. Re: jBPM BPEL change DB - HowTo?
                  kvak_tnt

                  More by accident I found this docu here.
                  I think it has anything we need to change DBs.
                  The first link contains the needed links to other DBs.
                  Have fun!

                  http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources

                  This seems to be the original docu:
                  http://docs.jboss.org/jbossas/jboss4guide/r2/html/ch7.chapt.html#ch7.jcads.fig