You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2012/12/28 22:50:23 UTC

svn commit: r1426645 - in /ode/site/trunk/content: controlling-odes-memory-footprint.mdtext extensions/extension-activities-extensible-assign-operations.mdtext userguide/index.mdtext

Author: vanto
Date: Fri Dec 28 21:50:23 2012
New Revision: 1426645

URL: http://svn.apache.org/viewvc?rev=1426645&view=rev
Log:
missing content added.

Added:
    ode/site/trunk/content/controlling-odes-memory-footprint.mdtext
    ode/site/trunk/content/extensions/extension-activities-extensible-assign-operations.mdtext
Modified:
    ode/site/trunk/content/userguide/index.mdtext

Added: ode/site/trunk/content/controlling-odes-memory-footprint.mdtext
URL: http://svn.apache.org/viewvc/ode/site/trunk/content/controlling-odes-memory-footprint.mdtext?rev=1426645&view=auto
==============================================================================
--- ode/site/trunk/content/controlling-odes-memory-footprint.mdtext (added)
+++ ode/site/trunk/content/controlling-odes-memory-footprint.mdtext Fri Dec 28 21:50:23 2012
@@ -0,0 +1,51 @@
+Title: Controlling ODE's Memory Footprint
+
+## Rational
+
+In most ODE deployments, processes are only used once in a while and the time between each solicitation can be pretty long with respect to the actual execution time. However the default behavior for the engine is to load all processes permanently in memory, including their definition. For environments where memory is scarce or where a large number of processes are deployed, this isn't suitable.
+
+ODE implements two mechanisms in order to reduce the memory footprint of the engine to the strict minimum:
+
+* Process definitions lazy-loading: processes are loaded in-memory bare, without their runtime definition (the compiled BPEL process). The definition will be loaded and associated to the in-memory process representation only when they are actually invoked. This mechanism is called hydration.
+* Process definitions reaping: process definitions can be disassociated from their in-memory representation if they haven't been used for some time of if there are already too many definitions loaded in memory. This mechanism is called dehydration. A process will automatically rehydrate itself when necessary (when it receives a message for example).
+
+## Activating Dehydration Policy
+
+In the Axis2 integration layer, activation of the policy can be done by setting the following property in the ode-axis2.properties file, which is located in the WEB-INF/conf directory of ODE's web application:
+
+	:::text
+	ode-axis2.process.dehydration=true
+
+The default configuration is to dehydrate processes that haven't been used for 20mn or after the maximum of 1000 process definitions in memory is reached.
+
+However, you may override the time that the process have to remain unused before they can be considered for dehydration by specifying a value, in milliseconds, for the following property in the ode-axis2.properties file:
+
+	:::text
+	# wait for 5 minutes instead of 20 minutes
+	ode-axis2.process.dehydration.maximum.age=300000
+
+Similarly, you may override the maximum number of process definitions that may remain hydrated at any given point in time by specifying a value for the following property in the ode-axis2.properties file:
+
+	:::text
+	# allow not more than 500 processes to be in memory at once
+	ode-axis2.process.dehydration.maximum.count=500
+
+## Dehydration Policy at IL Level
+
+If you're using your own interface layer or want to do some customization at this level, the default hydration policy is implemented in [CountLRUDehydrationPolicy](http://svn.apache.org/repos/asf/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/CountLRUDehydrationPolicy.java). It should be set on [BpelServerImpl](http://svn.apache.org/repos/asf/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java) and can been configured by setting the process max age or max count (either one will not influence the dehydration if set to 0). For example:
+
+	:::java
+	CountLRUDehydrationPolicy dehy = new CountLRUDehydrationPolicy();
+	dehy.setProcessMaxAge(60000);  // Setting process max age to one minute
+	dehy.setProcessMaxCount(100);  // Setting maximum hydrated processes to 100
+	_server.setDehydrationPolicy(dehy);
+
+The dehydration policy is polled every 10s to see if some processes should be dehydrated so a process max age of less than 10 seconds will be effectively of 10 seconds. Alternatively a custom dehydration policy can be used by implementing the [DehydrationPolicy|http://svn.apache.org/repos/asf/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DehydrationPolicy.java] interface.
+
+## In-Memory Processes
+
+The property `ode-axis2.mex.inmem.ttl` may be used to limit the time-to-live of in-memory instances.  This setting can be useful to avoid memory leaks related to in-memory processes that may get 'stuck' during execution and never terminate.
+
+	:::text
+	# automatically discard any in-memory process instance after 5 minutes
+	ode-axis2.mex.inmem.ttl=300000

Added: ode/site/trunk/content/extensions/extension-activities-extensible-assign-operations.mdtext
URL: http://svn.apache.org/viewvc/ode/site/trunk/content/extensions/extension-activities-extensible-assign-operations.mdtext?rev=1426645&view=auto
==============================================================================
--- ode/site/trunk/content/extensions/extension-activities-extensible-assign-operations.mdtext (added)
+++ ode/site/trunk/content/extensions/extension-activities-extensible-assign-operations.mdtext Fri Dec 28 21:50:23 2012
@@ -0,0 +1,76 @@
+Title: Extension Activities & Extensible Assign Operations
+
+## BPEL Extensibility
+
+Since BPEL 2.0 it is possible to extend the language by user-defined activities and custom variable assignment mechanisms.
+
+Apache ODE (>= 2.0) supports these extensibility mechanisms and provides a plug-in architecture that allows for registering third-party extensions.
+
+BPEL extensions must be declared for use in the process preamble to tell the engine which extensions must be available and which are optional. This can be done by adding an `<extension>` element to your BPEL process model:
+
+    :::xml
+    <bpel:process...>
+
+        <bpel:extensions>
+            <bpel:extension namespace="#extension-namespace#" 
+                            mustUnderstand="#yes|no#"/>
+        </bpel:extensions>
+
+    ...
+    </bpel:process>
+
+This snippet declares the given extension namespace and tells the engine what to do if no extension bundle is registered for this namespace. If `mustUnderstand` is `yes` and no extension bundle is registered the engine complains during the deployment of the process model and refuses the execution of the process model. If `mustUnderstand` is `no` the engine logs a warning but continuous with deployment and execution. Unregistered extension activities are then executed like an `<empty>` activity.
+
+### Extension Activities
+
+    :::xml
+    <extensionActivity>
+        <anyElementQName standard-attributes>
+            standard-elements
+        </anyElementQName>
+    </extensionActivity>
+
+### Extensible Assign Operations
+
+    :::xml
+    <assign validate="yes|no"? standard-attributes>
+        standard-elements
+        <extensionAssignOperation>
+            assign-element-of-other-namespace
+        </extensionAssignOperation>
+    </assign>
+
+## Using BPEL Extensibility in Apache ODE
+
+<div class="alert alert-warning"><h4 class="alert-heading">ODE version</h4>
+These extension points are only available on ODE experimental
+</div>
+
+In ODE extension activities and extension assign operations are grouped into so called Extension Bundles. Extension bundles are associated with an extension namespace and may provide several Extension Operations. Extension operations are the actual implementations of extension code and can be used for both, extension activities and extension assign operations.
+
+### Installation of extensions (WAR - Axis2 deployable)
+
+* Copy the extension. The extension bundle and its dependencies must be part of the  class path. The easiest way to achieve this is to copy the  extension jar to /WEB-INF/lib.
+* Register the extension. Open `/WEB-INF/conf/ode-axis2.properties` and add/uncomment the following lines:
+
+        :::text
+        ode-axis2.extension.bundles.runtime = fqcn.to.extension.bundle
+        ode-axis2.extension.bundles.validation = fqcn.to.extension.bundle
+
+The validation entry is only necessary if the extension bundle also provides compile-time validators
+* Start/Restart Apache ODE
+
+### Installation of extensions (JBI)
+* Embed the extension. The extension bundle and its dependencies must be part of the class path. The easiest way is to add the extension jar to the JBI deployable.
+* Register the extension. Extract and open ode-jbi.properties from ODE SE and add/uncomment the following lines:
+
+        :::text
+        ode-jbi.extension.bundles.runtime = fqcn.to.extension.bundle
+        ode-jbi.extension.bundles.validation = fqcn.to.extension.bundle
+
+    The validation entry is only necessary if your extension bundle also provides compile-time validators.
+* Re-add the properties file to the service engine archive and deploy it to the JBI container of choice.
+
+## Developing Extension Bundles
+
+TBC...
\ No newline at end of file

Modified: ode/site/trunk/content/userguide/index.mdtext
URL: http://svn.apache.org/viewvc/ode/site/trunk/content/userguide/index.mdtext?rev=1426645&r1=1426644&r2=1426645&view=diff
==============================================================================
--- ode/site/trunk/content/userguide/index.mdtext (original)
+++ ode/site/trunk/content/userguide/index.mdtext Fri Dec 28 21:50:23 2012
@@ -42,7 +42,7 @@ ODE can be deployed in three different e
 <a name="UserGuide-HowTo"></a>
 ## How To
 1. [ODE JBI and Axis2 properties overview](/ode-jbi-and-axis2-properties-overview.html)
-1. [Controlling ODE's Memory Footprint](/controlling-ode's-memory-footprint.html)
+1. [Controlling ODE's Memory Footprint](/controlling-odes-memory-footprint.html)
 1. [Endpoint Configuration](/endpoint-configuration.html)
 1. [HTTP Authentication](/http-authentication.html)
 1. [Using a JNDI DataSource under ServiceMix JBI](/using-a-jndi-datasource-under-servicemix-jbi.html)