[jboss-user] [jBPM] - jBPM without database
Jorge Ferreira
do-not-reply at jboss.com
Fri Jun 25 12:14:23 EDT 2010
Jorge Ferreira [http://community.jboss.org/people/imjorge] replied to the discussion
"jBPM without database"
To view the discussion, visit: http://community.jboss.org/message/549733#549733
--------------------------------------------------------------
You can use a in-memory database with hsqldb.
Just put jbpm.hibernate.cfg.xml in the classpath with the following contents:
> <?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 http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
>
> <hibernate-configuration>
> <session-factory>
>
> <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
> <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
> <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
> <property name="hibernate.connection.username">sa</property>
> <property name="hibernate.connection.password"></property>
>
>
> <property name="hibernate.format_sql">true</property>
> <property name="hibernate.show_sql">true</property>
>
> <property name="hibernate.hbm2ddl.auto">create-drop</property>
>
>
> <mapping resource="jbpm.repository.hbm.xml" />
> <mapping resource="jbpm.execution.hbm.xml" />
> <mapping resource="jbpm.history.hbm.xml" />
> <mapping resource="jbpm.task.hbm.xml" />
> <mapping resource="jbpm.identity.hbm.xml" />
>
> </session-factory>
> </hibernate-configuration>
I assume that you already have jbpm.cfg.xml on the classpath and that jbpm.cfg.xml includes directly or indirectly jbpm.hibernate.cfg.xml.
In my unit testing setup jbpm.cfg.xml includes jbpm.tx.hibernate.cfg.xml that then includes jbpm.hibernate.cfg.xml:
jbpm.cfg.xml
> <jbpm-configuration>
> [...]
> <import resource="jbpm.tx.hibernate.cfg.xml" />
> [...]
>
> </jbpm-configuration>
jbpm.tx.hibernate.cfg.xml (from jbpm.jar):
> <jbpm-configuration>
>
> <process-engine-context>
> [...]
> <hibernate-configuration>
> <cfg resource="jbpm.hibernate.cfg.xml" />
> </hibernate-configuration>
> [...]
>
> </jbpm-configuration>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/549733#549733]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100625/50b57876/attachment.html
More information about the jboss-user
mailing list