Here are Steps To run jBPM 3.0.2 on MySql 4.1.15
Some of them might be unnecessary or redundant but if all of them are followed 
it surely gets jbpm running on MySql .. any additional comments are welcome .. 
thanks 

1) Extract All files 
2) Set up JAVA_HOME, PATH 
3) Change TMP, TEMP directories to some folder like C:\TEMP

step1: under 'jbpm\lib', create 'mysql' directory

step2: copy mysql-connector-java-3.1.7-bin.jar from 'jbpm-db\mysql\lib' 

to 'jbpm\lib\mysql' directory

step3: under 'jbpm\src\resources', create 'mysql' directory

step4: copy (create.db.hibernate.properties, identity.db.xml) from 

'hsqldb' directory to 'mysql' directory

step5: Edit 'create.db.hibernate.properties' file with something like 

this:

        # innodb has acid compliance, might be best to use it?
        hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect

        # could also be used maybe, see hibernate and mysql websites 

for more info
        # hibernate.dialect=org.hibernate.dialect.MySQLMyISAMDialect
        # hibernate.dialect=org.hibernate.dialect.MySQLDialect

        hibernate.connection.driver_class=com.mysql.jdbc.Driver
        hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm
        hibernate.connection.username=root
        hibernate.connection.password=

        hibernate.show_sql=true
        hibernate.query.substitutions=true 1, false 0 
        hibernate.c3p0.min_size=1
        hibernate.c3p0.max_size=3
        
step6: under 'jbpm\src\resources\jbpm.sar' edit 

jbpm.hibernate.properties with somehting like this
        
        # innodb has acid compliance, might be best to use it?
        hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
        
        # could also be used maybe, see hibernate and mysql websites 

for more info
        # hibernate.dialect=org.hibernate.dialect.MySQLMyISAMDialect
        # hibernate.dialect=org.hibernate.dialect.MySQLDialect
        
        hibernate.connection.driver_class=com.mysql.jdbc.Driver
        hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm
        hibernate.connection.username=root
        hibernate.connection.password=
        
        hibernate.show_sql=true
        hibernate.query.substitutions=true 1, false 0 
        hibernate.c3p0.min_size=1
        hibernate.c3p0.max_size=3


step7: under 'jbpm\src\resources\jbpm.sar\META-INF' edit 

jboss-service.xml .. 
        replace 'DefaulsDS' with 'MySqlDS'
        
Step8:  under 'jbpm\src\config.files' Edit hibernate.cfg.xml with 

someething like this 

            <!-- jdbc connection properties -->
            org.hibernate.dialect.MySQLInnoDBDialect
            com.mysql.jdbc.Driver
            jdbc:mysql://localhost:3306/jbpm
            root
            

            <!-- c3p0 connection pooling properties -->
            1
            3

step9: under 'jbpm' directory, edit the build.properties file with 

something like this:
        
        # jbpm.version only used for creating javadocs and the 

distribution package
        jbpm.version=3.0.2

        # ant.home is only used in the ant.install.libs target for 

copying the junit and clover libs
        ant.home=D:\apache-ant-1.6.5

        # jbpm.home is only to allow build scripts to open the browser 

with the html test results
        jbpm.home=D:\jbpm-starters-kit-3.0.2\jbpm

        # jboss config proper only used for deployment
        jboss.home=D:\jbpm-starters-kit-3.0.2\jbpm-server
        jboss.version=4.0.2
        jboss.source.configuration=jbpm

        # for creating the distribution
        jbpm.gpd.site.file=
        
        
step10:         under 'jbpm' directory, edit ANT script 

'build.deploy.xml' ,
        find target name='create.db' and  delete  'db.start' and delete 

'' 
        in this block replace all 'hsqldb' with 'mysql' to modify the 

paths of the xmls so it looks something like this:
        
        
             
             
             
            
              
            
        

step11:         Delete or rename the 'jbpm\build' folder and run ANT 

command 'ant -buildfile build.deploy.xml create.db'
        when this task is success check to see that JBPM database has 

33 tables. (mysql database should be started before running this 

command)

step12:         run ANT script command 'ant -buildfile build.deploy.xml 

build.service.archive'
        run ANT script command 'ant -buildfile build.deploy.xml 

build.webapp'

step13: copy jbpm.war amd jbpm.sar.dir folder to 

'jbpm-server\server\jbpm\deploy' and rename jbpm.sar.dir to jbpm.sar

step14: delete the hsqldb-ds.xml from 'jbpm-server\server\jbpm\deploy' 

and copy mysql-ds.xml from 'jbpm-server\doc\examples\jca' to 

'jbpm-server\server\jbpm\deploy' and modify it to somethign like this:
        
        <?xml version="1.0" encoding="UTF-8"?>
        
        <!-- $Id: mysql-ds.xml,v 1.3.2.1 2004/12/01 11:46:00 schrouf 

Exp $ -->
        <!--  Datasource config for MySQL using 3.0.9 available from:
        http://www.mysql.com/downloads/api-jdbc-stable.html
        -->
        
        
          <local-tx-datasource>
            <jndi-name>MySqlDS</jndi-name>
            

<connection-url>jdbc:mysql://localhost:3306/jbpm</connection-url>
            <driver-class>com.mysql.jdbc.Driver</driver-class>
            <user-name>root</user-name>
            
            

<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MyS

QLExceptionSorter</exception-sorter-class-name>
            <!-- sql to call when connection is created
            <new-connection-sql>some arbitrary sql</new-connection-sql>
              -->
            <!-- sql to call on an existing pooled connection when it 

is obtained from pool 
            <check-valid-connection-sql>some arbitrary 

sql</check-valid-connection-sql>
              -->
        
            <!-- corresponding type-mapping in the 

standardjbosscmp-jdbc.xml (optional) -->
            
               <type-mapping>mySQL</type-mapping>
            
          </local-tx-datasource>
        
        
step15: copy mysql-connector-java-3.1.7-bin.jar from 

'jbpm-db\mysql\lib' to 'jbpm-server\server\jbpm\lib' directory

step16: copy c3p0-0.8.5.2.jar from 'jbpm\lib\hibernate' to 

'jbpm-server\server\jbpm\lib' directory

step17: under 'jbpm-server\server\jbpm\conf' edit 

standardjbosscmp-jdbc.xml as follows:
        
        
              java:/MySqlDS
              <datasource-mapping>mySQL</datasource-mapping>

step18: under 'jbpm-server\server\jbpm\conf' edit standardjaws.xml as 

follows:

        
           java:/MySqlDS
           <type-mapping>mySQL</type-mapping>
        false

step19: under 'jbpm-server\server\jbpm\conf' edit login-config.xml as 

follows:
        replace DefaultDS with MySqlDS
        replace HsqlDbRealm with MySqlRealm as follows 
        
        <!-- Security domains for testing new jca framework -->
            <application-policy name = "MySqlRealm">
               
                  <login-module code = 

"org.jboss.resource.security.ConfiguredIdentityLoginModule"
                     flag = "required">
                     <module-option name = 

"principal">root</module-option>
                     <module-option name = 

"userName">root</module-option>
                     <module-option name = "password"></module-option>
                     <module-option name = 

"managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS

</module-option>
                  </login-module>
               
        </application-policy>

step20: under 'jbpm-server\server\jbpm\deploy\jms' rename 

hsqldb-jdbc-state-service.xml and replace DefaultDS with MySqlDS

step21: under 'jbpm-server\server\jbpm\deploy\jms' delete 

'hsqldb-jdbc2-service.xml' and copy 'mysql-jdbc2-service.xml' from 

'jbpm-server\doc\examples\jms' to 'jbpm-server\server\jbpm\deploy\jms'
        
step22: under 'jbpm-server\server\jbpm\deploy' edit 'ejb-deployer.xml' 

and replace 'DefaultDS' with 'MySqlDS'

step23: from jbpm-server\server\bin execute 'run -c jbpm'



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3909796#3909796

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3909796


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to