nirav2003 [
http://community.jboss.org/people/nirav2003] created the discussion
"Re: how to install the jbpm5 to work on mysql database"
To view the discussion, visit:
http://community.jboss.org/message/611069#611069
--------------------------------------------------------------
Sorry for the late reply, but still I was trying to make it work. I have configured it as
follows:
1. Hibernate.cfg.xml
<session-factory>
<!-- Database connection settings -->
<property
name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property
name="connection.url">jdbc:mysql://192.168.12.99:3306/jbpm_demo?useUnicode=true&characterEncoding=UTF-8</property>
<!--property
name="connection.url">jdbc:h2:file:/NotBackedUp/data/mydb</property-->
<property name="connection.username">jbpmUser</property>
<property name="connection.password">jbpm</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property
name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property
name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property
name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">false</property>
<!-- Drop and re-create the database schema on startup? -->
<property name="hbm2ddl.auto">create</property>
<mapping resource="AuditLog.hbm.xml"/>
</session-factory>
2. Persistence.xml
<persistence-unit name="org.jbpm.persistence.jpa"
transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jdbc/jbpmDatasource</jta-data-source>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLInnoDBDialect"/>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
</properties>
</persistence-unit>
3. TestDS1-ds.xml
<local-tx-datasource>
<jndi-name>jdbc/jbpmDatasource</jndi-name>
<connection-url>jdbc:mysql://192.168.12.99:3306/jbpm_demo?useUnicode=true&characterEncoding=UTF-8</connection-url>
<!--connection-url>jdbc:h2:mem:mydb</connection-url-->
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>jbpmUser</user-name>
<password>jbpm</password>
</local-tx-datasource>
4. Persistence.xml in jbpm-human-task-5.1.0.CR1.jar properties changed to
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLInnoDBDialect"/>
<property name="hibernate.connection.driver_class"
value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.url"
value="jdbc:mysql://192.168.12.99:3306/JBPM_DEMO?useUnicode=true&characterEncoding=UTF-8"
/>
<property name="hibernate.connection.username"
value="jbpmUser"/>
<property name="hibernate.connection.password"
value="jbpm"/>
<property name="hibernate.connection.autocommit"
value="false" />
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="false" />
</properties>
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/611069#611069]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]