|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbpm.JbpmConfiguration
manages all configurations for jbpm including the hibernate configurations. *
To configure jBpm properly choose one of following 4 configuration mechanisms :
configure(Properties)
before the the method
getInstance()
is called.
configure(ClassLoader,String)
before the the method
getInstance()
is called.
Configuration parameters :
property
values
description
default value
hibernate.*
@see the hibernate docs
also the hiberate configs are done directly in the jbpm config file
jbpm's default hibernate configuration is an in-memory hsqldb database which is ideal for testing purposes
jbpm.create.tables
{ only-if-not-present | never }
If applicable, jbpm will create the the JBPM_ tables at startup if they are not present.
The generated ddl starts with dropping the tables and contraints, then creates the tables, then adds
the constraints.
only-if-not-present
jbpm.create.tables.log
{ true | false }
Specifies if the ddl that is generated for the creation of the tables is logged to standard out.
false
jbpm.create.tables.query
{ a plain SQL query }
is the plain sql query that checks wether the tables are present. this property is only used when
property 'jbpm.create.tables' is set to value 'only-if-not-present' (=default!). if execution of this query
results in an exception, jbpm will assume the jbpm-tables are not present.
SELECT ID FROM JBPM_DEFINITION WHERE ID = 1
jbpm.apply.transactions
{ yes | no }
Specifies how jbpm should handles transactions. 'yes' will apply a transaction on the jdbc connection
for every method that performs a jbpm update. Methods that perform an update are all methods except those
defined in *ReadService. 'no' means that jbpm will not apply any transactions. 'no' can be used inside
a container or with user supplied jdbc connections.
yes
jbpm.file.mgr
{ database | filesystem | the class-name of a class that implements org. jbpm. persistence. FileMgr }
Specifies how jbpm should store files (e.g. the class-files in a process archive). This
configuration is added because some database drivers (like e.g. oracle) aren't good at handling
binary data.
database
jbpm.file.mgr.directory
is the name of the root directory where jbpm can store files. Use forward slashes. E.g. /usr/jbpm or C:/data/jbpm
-no default specified-
jbpm.validate.xml
{ true | false }
The process archive parser will not validate the processdefinition.xml file if this property is set to false.
true
jbpm.id.generator
{ default | the class-name of a class that implements org. jbpm. persistence. IdGenerator }
The IdGenerator will be used to create ids for the jbpm persistable objects.
org. jbpm. persistence. hibernate. SequenceBlockIdGenerator
jbpm.id.generator.node.id
{ an integer between 0 and 65535 }
The unique id of this node in the cluster.
0
jbpm.id.generator.bocksize
{ an integer }
The blocksize for the hilo id generation scheme.
100
jbpm.id.generator.configuration
{ same | the resource of the id generator hibernate properties }
Note that the id generator requires a session in a separate transaction. Therefor
the session factory used by the id generator may not be obtained from a
container managed DataSource. So if you are not using a DataSource within a
which manages transactions, you can use the default value.
'same' means take the same properties for the id generator session factory
as the ones in this configuration. Otherwise, the name of a .properties resource
has to be specified in which contains the hibernate configuration for the
id generator session factory.
same
jbpm.log.stdout
{on|off}
Configures commons logging to use standard output. When set to
off, jbpm does not configure the commons logging.
on
jbpm.log.default
{ trace | debug | info | warn | error | fatal }
Specifies the default log level.
error
jbpm.log.package.* (where * represents any package name)
{ trace | debug | info | warn | error | fatal }
overwrites the jbpm default log level with the given value
jbpm. log. package. org. jbpm= debug
jbpm.scheduler.wait.period
long
the number of milliseconds to wait between scheduler polls
5000
jbpm.execute.actions
{ true | false }
If set to true, jBpm will execute the specified action handlers. This could be
set to false e.g. for testing purposes to avoid execution of business processes.
true
The user of the jBpm-API's must make sure that method configure(Properties)
is called before the service locator is used.
Field Summary | |
protected static java.util.Map |
abbreviatedClassNames
|
Constructor Summary | |
JbpmConfiguration(java.lang.ClassLoader classLoader,
java.lang.String resource)
|
|
JbpmConfiguration(java.util.Properties properties)
|
|
JbpmConfiguration(java.lang.String resource)
|
Method Summary | |
static void |
configure(java.lang.ClassLoader classLoader,
java.lang.String resource)
configures jBpm from a resource on a classloader. |
static void |
configure(java.util.Properties jBpmConfigurationProperties)
configures jBpm from Properties. |
static void |
configure(java.lang.String resource)
configures jBpm from a resource (using the jbpm-classloader). |
boolean |
containsKey(java.lang.String key)
checks if a key is present. |
static boolean |
getBoolean(java.util.Properties properties,
java.lang.String key)
|
boolean |
getBoolean(java.lang.String key)
gets a boolean configuration property. |
static java.util.Properties |
getDefaultProperties()
|
org.jbpm.persistence.FileMgr |
getFileMgr()
|
org.jbpm.persistence.IdGenerator |
getIdGenerator()
|
static JbpmConfiguration |
getInstance()
provides access to the jbpm-configuration-properties. |
static long |
getLong(java.util.Properties properties,
java.lang.String key)
|
long |
getLong(java.lang.String key)
gets a long configuration property. |
org.jbpm.persistence.PersistenceSessionFactory |
getPersistenceSessionFactory()
|
java.util.Properties |
getProperties()
provides access to all the jbpm configuration properties. |
org.jbpm.impl.ServiceFactory |
getServiceFactory()
|
java.lang.String |
getString(java.lang.String key)
gets a string configuration property. |
static void |
initialiseLogging(java.util.Properties properties)
|
static void |
initialiseLogging(java.lang.String resource)
|
java.lang.Object |
instantiate(java.lang.String key,
java.lang.Class expectedClass)
instantiates an implementation of which the class-name is configured in the configuration. |
static java.util.Properties |
loadProperties(java.lang.ClassLoader classLoader,
java.lang.String resource)
|
static java.util.Properties |
loadProperties(java.lang.String resource)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.util.Map abbreviatedClassNames
Constructor Detail |
public JbpmConfiguration(java.util.Properties properties)
public JbpmConfiguration(java.lang.String resource) throws ConfigurationException
public JbpmConfiguration(java.lang.ClassLoader classLoader, java.lang.String resource) throws ConfigurationException
Method Detail |
public static java.util.Properties getDefaultProperties()
public static JbpmConfiguration getInstance()
ConfigurationException
- if jbpm was not yet configured.public static void configure(java.util.Properties jBpmConfigurationProperties)
public static void configure(java.lang.String resource) throws ConfigurationException
ConfigurationException
public static void configure(java.lang.ClassLoader classLoader, java.lang.String resource) throws ConfigurationException
ConfigurationException
public static java.util.Properties loadProperties(java.lang.String resource) throws ConfigurationException
ConfigurationException
public static java.util.Properties loadProperties(java.lang.ClassLoader classLoader, java.lang.String resource) throws ConfigurationException
ConfigurationException
public static void initialiseLogging(java.lang.String resource)
public static void initialiseLogging(java.util.Properties properties)
public java.util.Properties getProperties()
public boolean containsKey(java.lang.String key)
public java.lang.String getString(java.lang.String key)
public boolean getBoolean(java.lang.String key)
ConfigurationException
- if the value for the given key does not match with one of the expected values.public static boolean getBoolean(java.util.Properties properties, java.lang.String key)
public long getLong(java.lang.String key)
public static long getLong(java.util.Properties properties, java.lang.String key)
public java.lang.Object instantiate(java.lang.String key, java.lang.Class expectedClass)
key
- is the key under which the class-name can be looked up in the configuration.
ConfigurationException
- if for some reason or another, the instantiator cannot produce
an object of the expectedClass.public org.jbpm.persistence.FileMgr getFileMgr()
public org.jbpm.persistence.IdGenerator getIdGenerator()
public org.jbpm.persistence.PersistenceSessionFactory getPersistenceSessionFactory()
public org.jbpm.impl.ServiceFactory getServiceFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |