2. Configuring
   2.1 Database
   2.2 Configuring Datasources
   2.3 Configuring JMS Datasources
 2. Configuring
jawFlow is provided in bundle with jboss-4.0.4GA Application Server. The distribution should run with a minimum configuration work.
 2.1 Database
Jawflow needs a database in order to store process definitions and process status. The database is created via the script jawflow.sql provided with the distribution.
 2.2 Configuring Datasources
The jawflow DataSource is defined in the file

server/default/jawflow.deploy/jawflow-ds.xml

and it should be configured pointing to the database created in the previous step.
<datasources> <local-tx-datasource> <jndi-name>jawflowDS</jndi-name> <connection-url>...jdbc url...</connection-url> <driver-class>...jdbc driver...</driver-class> <user-name>...username...</user-name> <password>...password...</password> <min-pool-size>5</min-pool-size> <max-pool-size>20</max-pool-size> <idle-timeout-minutes>0</idle-timeout-minutes> <track-statements/> </local-tx-datasource> </datasources>
The parameters in the previous file are:
jdbc urlThe JDBC URL of your DB (e.g.: jdbc:postgresql://server/jawflow)
jdbc driverThe name of the class implementing the jdbc Driver (e.g.:org.postgresql.Driver)
usernamea valid username to connect to the database with read/write access
passwordthe user's password

You can of course configure the pooling parameters according to your specific needs.
 2.3 Configuring JMS Datasources
jawFlow uses JMS for asynchronous state saving hence it needs a working JMS storage. The default distributions uses a Postgres configured Datasource for the jms Queue but you can use whatever persistent jms mechanism provided by jboss. The provided datasource is in file

server/default/deploy/postgres-ds.xml

and its configuration is similar to the one described previously for the main jawFlow DS. You can of course use the same database for both jawFlow and JMS queue
Chapter 1 Contents Chapter 3