why you don't use a memory database? In my opinion it makes no sense if your process instances are not persisted? jBPM uses Hibernate as persistence layer, so it's quite easy to use HSQLDB for example as database, which must not be configured, e.g.:
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>config/jdbc.properties</value>
</list>
</property>
</bean>
<!-- DATASOURCE/DB KONFIGURIEREN -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>${database.driver}</value>
</property>
<property name="url">
<value>${database.url}</value>
</property>
<property name="username">
<value>${database.username}</value>
</property>
<property name="password">
<value>${database.password}</value>
</property>
</bean>
<!-- Hibernate configuration when using Hibernate Annotations -->
<bean id="hbnSessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation">
<value>classpath:/config/hibernate.cfg.xml</value>
</property>
<property name="typeDefinitions">
<ref local="jbpmTypes" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${database.dialect}</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
<!-- JBPM data types -->
<bean id="jbpmTypes" class="org.springframework.orm.hibernate3.TypeDefinitionBean">
<property name="typeName"><value>string_max</value></property>
<property name="typeClass"><value>org.jbpm.db.hibernate.StringMax</value></property>
</bean>
<!-- jBPM configuration -->
<bean id="jbpmConfiguration"
class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
<property name="sessionFactory" ref="hbnSessionFactory" />
<property name="configuration" value="config/jbpm.cfg.xml" />
<!-- Process will be automatically deployed when context starts -->
<property name="processDefinitionsResources">
<list>
<value>servicerequest/processdefinition.xml</value>
</list>
</property>
</bean>
jdbc-properties:
database.url=jdbc:hsqldb:mem:muleSpike
database.driver=org.hsqldb.jdbcDriver
database.username=sa
database.password=
database.dialect=org.hibernate.dialect.HSQLDialect
According Mule 2 Config for jbpm:
<!-- JBPM Process Engine -->
<spring:bean id="jbpm" class="org.mule.transport.bpm.jbpm.Jbpm" destroy-method="destroy">
<spring:property name="jbpmConfiguration" ref="jbpmConfiguration"/>
</spring:bean>
<bpm:connector name="jbpmConnector" bpms-ref="jbpm"/>
If you use the jBPM without Mule you don't need a database, because you load load your processdefinition an create process instance in code and your route through the process in the code. I don't know if you can use Mule with jBPM wihtout database.
greetings
markus
youhaodeyi wrote:
I want to use jBPM as our work flow engine. According to the default settings for jBPM in Mule2, it uses a derby database as the datasource. I don't need a database base for my application. I have tried to remove the Database feature from the configuration file but got some error. How can I remove this feature from jBPM?
Thanks.