Until 184.108.40.206, BPEL audit trails are saved to the database in the same JTA transaction as the main transaction. This causes three main problems:
Since SOA 220.127.116.11 (i.e. SOA 11G PatchSet 2), management of audit trail memory has been greatly enhanced. Not only has the size of the memory used been reduced, but also when and how audit trail is stored has improved. The three problems above now have solutions.
The audit trail enhancement comes in the form of the following configuration properties
Use this flag to choose the audit store strategy
This is the default value. And the behavior is the same as in the 10.1.3.x version.
By "synchronously" it means the BPEL service engine is saving the audit trail in the same thread as the main transaction. However, it is doing it in a "separate local transaction".
Because they are on the same thread, the cost of saving the audit trail is still included in the overall latency of the main transaction.
However, because they are on separate transactions, you can configure BPEL engine (using AuditFlushByteThreshold and AuditFlushEventThreshold) to flush out the audit trail from memory to database periodically regardless how long the main transaction would take. Moreover, having them on two separate transaction means the rollback of the main transaction will NOT affect the audit trail transaction. That is, you will still see audit trail even if the main transaction rolls back.
This is almost the same as "syncMultipleWrite", except that it is done not just in a separate transaction but also in a separate thread.
The advantage is that the audit trail latency is NOT directly included in the latency of main transaction (but because they still share the computing resources and database, the latency is still indirectly related).
The disadvantage is that because audit trails are being saved asynchronously, the audit trail may be out of sync from the main transaction (as the name 'async' implies).
When auditStorePolicy=syncMultipleWrite or auditStorePolicy=async, you use these two flags to control how often the engine should flush the audit events. These two properties do NOT apply to auditStorePolicy=syncSingleWrite.
auditFlushByteThreshold means after adding an event to the current batch, the engine would check if current batch byte size is greater than this value or not. if yes, then it would flush the current batch. The default value is 2048000 (byte), i.e. 2MB.
Similarly, auditFlushEventThreshold means this limit is reached, the engine would trigger the store call. The default value is 300 (events)
Both values need to be tuned based on the application and requirements.
This is the maximum size (in bytes) an audit trail details string can be before it is stored separately from the audit trail. The default value is 50000 (byte). This is the same property as in 10.1.3.x. Please refer to the SOA Management MBean for its detail explanation.
This is the same property in 10.1.3.x.
All of the above properties can be configured via the SOA EM Console. The path is EM -> SOA Infrastructure -> SOA Administration -> BPEL Properties -> More BPEL Configuration Properties