|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbpm.JbpmConfiguration
public class JbpmConfiguration
configuration of one jBPM instance.
During process execution, jBPM might need to use some services. A JbpmConfiguration contains the knowledge on how to create those services.
A JbpmConfiguration is a thread safe object and serves as a factory for
JbpmContext
s, which means one JbpmConfiguration
can be used to create JbpmContext
s for all threads.
The single JbpmConfiguration can be maintained in a static member or
in the JNDI tree if that is available.
A JbpmConfiguration can be obtained in following ways:
jbpm.cfg.xml
is used):
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();or
String myXmlResource = "..."; JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(myXmlResource);
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString( "" + ... " " );
ObjectFactory of = new MyCustomObjectFactory(); JbpmConfiguration.Configs.setDefaultObjectFactory(of); JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
JbpmConfigurations can be configured using a spring-like XML notation (in relax ng compact notation):
datatypes xs = "http://www.w3.org/2001/XMLSchema-datatypes" start = element beans { element object* } object = { jbpm-context | bean | ref | map | list | string | int | long | float | double | char | bool | true | false | null } jbpm-context = element jbpm-context { ( attribute name {xsd:string}, service*, save-operations? ) } service = element service { ( attribute name {xsd:string}, ( attribute factory {xsd:string} ) | ( factory ) ) } factory = element factory { ( bean | ref ) } save-operations = element save-operations { ( save-operation* ) } save-operation = element save-operation { ( ( attribute class {xsd:string} ) | ( bean | ref ) ) } bean = element bean { ( attribute ref-name {xsd:string} ) | ( attribute name {xsd:string}?, attribute class {xsd:string}?, attribute singleton { "true" | "false" }?, constructor*, field*, property* ) } ref = element ref { ( attribute bean (xsd:string) ) } constructor = element constructor { attribute class {xsd:string}?, ( attribute factory {xsd:string}, attribute method {xsd:string} )?, parameter* } parameter = element parameter { attribute class {xsd:string}, object } field = element field { attribute name {xsd:string}, object } property = element property { ( attribute name {xsd:string} | attribute setter {xsd:string} ), object } map = element map { entry* } entry = element entry { key, value } key = element key { object } value = element value { object } list = element list { object* } string = element string {xsd:string} int = element integer {xsd:integer} long = element long {xsd:long} float = element float {xsd:string} double = element string {xsd:double} char = element char {xsd:character} bool = element bool { "true" | "false" } true = element true {} false = element false {} null = element null {}
Other configuration properties
jbpm.msg.wait.timout | |
jbpm.files.dir | |
jbpm.types |
Nested Class Summary | |
---|---|
static class |
JbpmConfiguration.Configs
gives the jbpm domain model access to configuration information via the current JbpmContext. |
Constructor Summary | |
---|---|
JbpmConfiguration(ObjectFactory objectFactory)
|
Method Summary | |
---|---|
void |
close()
|
void |
close(java.lang.String jbpmContextName)
|
JbpmContext |
createJbpmContext()
|
JbpmContext |
createJbpmContext(java.lang.String name)
|
void |
createSchema()
|
void |
createSchema(java.lang.String jbpmContextName)
|
void |
dropSchema()
|
void |
dropSchema(java.lang.String jbpmContextName)
|
JbpmContext |
getCurrentJbpmContext()
|
static JbpmConfiguration |
getInstance()
|
static JbpmConfiguration |
getInstance(java.lang.String resource)
|
ServiceFactory |
getServiceFactory(java.lang.String serviceName)
|
ServiceFactory |
getServiceFactory(java.lang.String serviceName,
java.lang.String jbpmContextName)
|
static JbpmConfiguration |
parseInputStream(java.io.InputStream inputStream)
|
protected static ObjectFactory |
parseObjectFactory(java.io.InputStream inputStream)
|
static JbpmConfiguration |
parseResource(java.lang.String resource)
|
static JbpmConfiguration |
parseXmlString(java.lang.String xml)
create an ObjectFacotory from an XML string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JbpmConfiguration(ObjectFactory objectFactory)
Method Detail |
---|
public static JbpmConfiguration getInstance()
public static JbpmConfiguration getInstance(java.lang.String resource)
protected static ObjectFactory parseObjectFactory(java.io.InputStream inputStream)
public static JbpmConfiguration parseXmlString(java.lang.String xml)
public static JbpmConfiguration parseInputStream(java.io.InputStream inputStream)
public static JbpmConfiguration parseResource(java.lang.String resource)
public JbpmContext createJbpmContext()
public JbpmContext createJbpmContext(java.lang.String name)
public ServiceFactory getServiceFactory(java.lang.String serviceName)
public ServiceFactory getServiceFactory(java.lang.String serviceName, java.lang.String jbpmContextName)
public void createSchema()
public void createSchema(java.lang.String jbpmContextName)
public void dropSchema()
public void dropSchema(java.lang.String jbpmContextName)
public void close()
public void close(java.lang.String jbpmContextName)
public JbpmContext getCurrentJbpmContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |