You are on page 1of 5

Durable and Transient Processes

Oracle BPEL Process Manager uses the dehydration store database to maintain long-running asynchronous processes and their current state information in a database while they wait for asynchronous callbacks. Storing the process in a database preserves the process and prevents any loss of state or reliability if a system shuts down or a network problem occurs. There are two types of processes in Oracle BPEL Process Manager. These processes impact the dehydration store database in different ways.

Transient processes: this process type does not incur any intermediate dehydration points during process execution. If there are unhandled faults or there is system downtime during process execution, the instances of a transient process do not leave a trace in the system. Instances of transient processes cannot be saved in-flight (whether they complete normally or abnormally). Transient processes are typically short-lived, request-response style processes. The synchronous process you design in Oracle JDeveloper is an example of a transient process. Durable processes: this process type incurs one or more dehydration points in the database during execution because of the following activities: o Receive activity o OnMessage branch in a pick activity o OnAlarm branch in a pick activity o Wait activity Instances of durable processes can be saved in-flight (whether they complete normally or abnormally). These processes are typically long-living and initiated through a one-way invocation. Because of out-of-memory and system downtime issues, durable processes cannot be memory-optimized.

BPEL Threading Model


Review the BPEL threading model details in this section before attempting to configure any property settings. Figure 7-1 shows thread usage during a request-response and one-way process instance invocation. Figure 7-1 Thread Usage

From Figure 7-1 and the previous sections, some important relationships can be derived for properly setting the threading and connection pooling parameters. The number of concurrent instances being processed is determined by the number of request-response client requests and the number of WorkerBean threads allocated. The following relationship can be stated.

Maximum DB Connections >= (WorkerBean listener threads) + (Maximum concurrent request-response invocations)
The dspMaxThreads property allocates WorkerBean threads to various domains. This leads to the following relationships:

If only one domain exists, these formulas can be simplified further:

dspMaxThreads = (WorkerBean listener threads) Maximum DB Connections >= (dspMaxThreads) + (Maximum concurrent request-response invocations) dspMaxThreads BPEL Property
This property sets the maximum number of active dispatcher threads that process messages during peak load times. This property is

applicable to durable processes and is dependent on the application server configuration. This is the simplest way to improve the performance and scalability of the domain. Oracle BPEL Server uses MDB threads to process Oracle BPEL Server messages. The maximum value for this property is dependent upon the Oracle BPEL Server's MDB J2EE listener threads setting. For Oracle Application Server, this count is configured in the orion-ejb-jar.xml deployment descriptor file. For example, if the total number of MDB J2EE listener threads is 120, the value of dspMaxThreads can be set to 120 or less. If you have configured multiple domains, the sum of the dspMaxThreads settings for all domains must not exceed the MDB J2EE listener threads setting.If the CPU utilization of your application server and database hosts are well below capacity, try increasing this value and the MDB J2EE listener threads setting when necessary. If the CPUs are still not fully utilized, then consider running multiple Oracle BPEL Server instances. Note: MDB J2EE listener threads configuration is specified in the following file:

For the Oracle BPEL Process Manager for Developers installation type, this file is located at

SOA_Oracle_Home\j2ee\home\applicationdeployments\orabpel\ejb_ob_engine\orion-ejbjar.xml under WorkerBean.

For the Oracle BPEL Process Manager for OracleAS Middle Tier installation type, this file is located at

SOA_Oracle_Home\j2ee\home\applicationdeployments\orabpel\ejb_ob_engine\orion-ejbjar.xml under WorkerBean. Oracle BPEL Server EJB Configuration


To increase performance, Oracle recommends removing the maxinstances attribute for all of Oracle BPEL Server's EJBs in the orionejb-jar.xml file. For the Oracle BPEL Process Manager for OracleAS Middle Tier installation type, this file is located in

SOA_Oracle_Home\j2ee\home\applicationdeployments\orabpel\ejb_ob_engine.

This enables the application server to allocate more resources to heavily-used beans.

7.5.2.1 WorkerBean
Oracle BPEL Server uses an MDB called WorkerBean to perform processing. Therefore, it is important to allocate enough threads to this MDB. Otherwise, resource utilization is not optimal. The following code from the orion-ejb-jar.xml file shows an allocation of 70 threads.

<message-driven-deployment name="WorkerBean" destination-location="jms/collaxa/BPELWorkerQueue" connection-factorylocation="jms/collaxa/BPELWorkerQueueFactory" listener-threads="70" min-instances="100"> <ejb-ref-mapping name="ejb/local/DispatcherLocalBean" /> .. .. </message-driven-deployment> 7.5.2.2 InvokerBean
The invoker bean is used only for nonblocking invoke activities. If you set some invokes to be nonblocking, increase the number of threads allocated to the InvokerBean. The following orion-ejb-jar.xml code shows an allocation of 30 threads.

<message-driven-deployment name="InvokerBean" destination-location="jms/collaxa/BPELInvokerQueue" connection-factorylocation="jms/collaxa/BPELInvokerQueueFactory" listener-threads="30" min-instances="100"> <ejb-ref-mapping name="ejb/local/ProcessManagerLocalBean" /> </message-driven-deployment>
Note: The sum of the InvokerBean and WorkerBean threads must be greater than or equal to the value specified for the dspMaxThreads domain property in Oracle BPEL Control under Manage BPEL Domain > Configuration. If you configured multiple domains, add the

dspMaxThreads property for all your domains and compare that sum to the MDB total thread count.

http://forums.oracle.com/forums/thread.jspa? threadID=939339

You might also like