Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm
Class JbpmConfiguration

    java.lang.Object
      org.jbpm.JbpmConfiguration

All Implemented Interfaces:
  java.io.Serializable

    public class JbpmConfiguration

extends java.lang.Object
implements java.io.Serializable

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:

- from a resource (by default `jbpm.cfg.xml` is used):

       JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();

  or

       String myXmlResource = "...";
       JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(myXmlResource);

- from an XML string:

       JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
         "" +
         ...
         ""
       );

- By specifying a custom implementation of an object factory. This can be used to specify a JbpmConfiguration in other bean-style notations such as used by JBoss Microcontainer or Spring.

       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.files.dir |
jbpm.types |

See Also:
  Serialized Form

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)`
`protected static JbpmConfiguration` | `createJbpmConfiguration(ObjectFactory objectFactory)`
`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)`
`JobExecutor` | `getJobExecutor()`
`ServiceFactory` | `getServiceFactory(java.lang.String serviceName)`
`ServiceFactory` | `getServiceFactory(java.lang.String serviceName, java.lang.String jbpmContextName)`
`static boolean` | `hasInstance(java.lang.String resource)`
`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.
`void` | `startJobExecutor()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JbpmConfiguration

    public JbpmConfiguration(ObjectFactory objectFactory)

Method Detail

### getInstance

    public static JbpmConfiguration getInstance()

### getInstance

    public static JbpmConfiguration getInstance(java.lang.String resource)

### hasInstance

    public static boolean hasInstance(java.lang.String resource)

### parseObjectFactory

    protected static ObjectFactory parseObjectFactory(java.io.InputStream inputStream)

### parseXmlString

    public static JbpmConfiguration parseXmlString(java.lang.String xml)

  create an ObjectFacotory from an XML string.

### createJbpmConfiguration

    protected static JbpmConfiguration createJbpmConfiguration(ObjectFactory objectFactory)

### parseInputStream

    public static JbpmConfiguration parseInputStream(java.io.InputStream inputStream)

### parseResource

    public static JbpmConfiguration parseResource(java.lang.String resource)

### createJbpmContext

    public JbpmContext createJbpmContext()

### createJbpmContext

    public JbpmContext createJbpmContext(java.lang.String name)

### getServiceFactory

    public ServiceFactory getServiceFactory(java.lang.String serviceName)

### getServiceFactory

    public ServiceFactory getServiceFactory(java.lang.String serviceName,
                                            java.lang.String jbpmContextName)

### createSchema

    public void createSchema()

### createSchema

    public void createSchema(java.lang.String jbpmContextName)

### dropSchema

    public void dropSchema()

### dropSchema

    public void dropSchema(java.lang.String jbpmContextName)

### close

    public void close()

### close

    public void close(java.lang.String jbpmContextName)

### getCurrentJbpmContext

    public JbpmContext getCurrentJbpmContext()

### startJobExecutor

    public void startJobExecutor()

### getJobExecutor

    public JobExecutor getJobExecutor()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD