This content has been marked as final.
Show 1 reply
-
1. Re: Jbpm with Mysql
bertrand.njiipwo Jul 4, 2006 11:21 AM (in response to xanlex)Hello Xanlex,
you are certainly use the default Hql-dataBase. To tell jbpm to work with your new DB you have to define a new DataSource file what jbpm will use to etablisch the connection to your database. That is what you have surely done. Complete this step by changing the JNDI name of your datasource to use the datasource-file you have just defined.
1- Define a new database configuration file {JBPM.BPEL.HOME}/src/resources/jbpm-bpel.sar/jbpm-bpel.ds.xml to tell hibernate to connect to your database via this DatasourceFile.
My configuration file is looking like this (Im Using JBoss AS-4.0.3-SP1, jbpm-3.0.3 and jbpm-bpel-1.0-alpha4).
{JBPM.BPEL.HOME}/src/resources/jbpm-bpel.sar/jbpm-bpel.ds.xml :<datasources> <local-tx-datasource> <jndi-name>JbpmBpelDS</jndi-name> <connection-url>jdbc:mysql://localhost/jbpmhello</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>jbpmuser</user-name> <password>jbpmuser</password> <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --> <metadata> <type-mapping>MySQL</type-mapping> </metadata> </local-tx-datasource> </datasources>
2 - Tell hibernate to use the defined DataSource JbpmBpelDS. Therefore modify the file {JBPM.BPEL.HOME}/src/resources/jbpm-bpel.sar/hibernate.properties;
Specify the dialect you need and change the name of the DefaultDS which uses the HQL Database to the JNDI name of the DataSource JbpmBpelDS you have just defined.
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect hibernate.connection.datasource=java:/JbpmBpelDS
3 - Don't also forget to modify the file {JBPM.BPEL.HOME}/src/resources/jbpm-bpel.sar/META-INF/jboss-service.xml and tell the jbpm-service to use your new DataSource.
Hey Xanlex reed the documentation fine and don't forget. The problem you are facing know 1000 persons have encountered the same problem. Therefore use the forum.
Hope it's help you
Best regards
Bertrand Njipwo