[jboss-user] [JBoss jBPM] - Re: Problem with changing backend database to mysql
david_ling
do-not-reply at jboss.com
Sun Mar 9 23:45:09 EDT 2008
Sorry I should have posted more details in my first message.
In jbpm-ds.xml I have changed the code to the following
| <?xml version="1.0" encoding="UTF-8"?>
|
| <datasources>
|
| <local-tx-datasource>
| <jndi-name>JbpmDS</jndi-name>
| <connection-url>jdbc:mysql://localhost:3306/jbpmbackend</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>root</user-name>
| <password>password</password>
| <metadata>
| <type-mapping>MySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
|
| </datasources>
|
In login-config.xml I have added the following to the end of the file
| <application-policy name = "jbpm">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
| flag="required">
| <module-option name="dsJndiName">java:/JbpmDS</module-option>
| <module-option name="principalsQuery">
| SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?
| </module-option>
| <module-option name="rolesQuery">
| SELECT g.NAME_ ,'Roles'
| FROM JBPM_ID_USER u,
| JBPM_ID_MEMBERSHIP m,
| JBPM_ID_GROUP g
| WHERE g.TYPE_='security-role'
| AND m.GROUP_ = g.ID_
| AND m.USER_ = u.ID_
| AND u.NAME_=?
| </module-option>
| </login-module>
| </authentication>
| </application-policy>
|
In standardjaws.xml I have changed it to
| <jaws>
| <datasource>java:/JbpmDS</datasource>
| <type-mapping>mySQL</type-mapping>
| <debug>false</debug>
| ......
|
In the hibernate.cfg.xml file, I have changed it to the following:
<?xml version='1.0' encoding='utf-8'?>
|
| <!DOCTYPE hibernate-configuration PUBLIC
| "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
| "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
| <hibernate-configuration>
| <session-factory>
|
| <!-- hibernate dialect -->
| <!--<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property> -->
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
|
| <!-- JDBC connection properties (begin) -->
| <!--<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property> -->
| <!--<property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property> -->
| <!--<property name="hibernate.connection.username">sa</property> -->
| <!--<property name="hibernate.connection.password"></property> -->
| <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
| <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmbackend</property>
| <property name="hibernate.connection.username">root</property>
| <property name="hibernate.connection.password">password</property>
| <!-- JDBC connection properties (end) -->
|
| <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
|
| <!-- DataSource properties (begin) ==
| <property name="hibernate.connection.datasource">java:/JbpmDS</property>
| == DataSource properties (end) -->
|
| <!-- JTA transaction properties (begin) -->
| <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
| <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
| <!-- JTA transaction properties (end) -->
|
Any help would be appreciated.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135184#4135184
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135184
More information about the jboss-user
mailing list