About Oracle Service Bus

21-6 Oracle Fusion Middleware Performance and Tuning Guide Do not set XA or Exactly-Once unless the reliability level required is once and only once and its possible to use the setting it is not possible if the client is a HTTP client. If OSB initiates a transaction, it is possible to replace XA with LLR to achieve the same level of reliability. OSB can invoke a back end HTTP service asynchronously if the QOS is Best- Effort. Asynchronous invocation allows OSB to scale better with long running back-end services. It also allows Publish over HTTP to be truly fire-and-forget. ■ Disable or delete all log actions. Log actions add an IO overhead. Logging also involves an XQuery evaluation which can be expensive. Writing to a single device resource or directory can also result in lock contentions.

21.6 Design Considerations for XQuery Tuning

OSB uses XQuery and XPath extensively for various actions like Assign, Replace, and Routing Table. The following XML structure body is used to explain XQuery and XPath tuning concepts: soap-env:Body Order CtrlArea CustNameMaryCustName CtrlArea ItemList Item name=ACE_Car 20000 Item Item name= Ext_Warranty 1500Item …. a large number of items ItemList Summary Total70000Total StatusShippedStatus ShippingMy Shipping Firm Shipping Summary Order soap-env:Body ■ Avoid the use of double front slashes in XPaths. bodyCustName while returning the same value as bodyOrderCtrlAreaCustName will perform a lot worse than the latter expression. implies all occurrences of a node irrespective of the location in an XML tree. Thus, the entire depth and breadth of the XML tree has to be searched for the pattern specified after a . Use only if the exact location of a node is not known at design time. ■ Index XPaths where applicable. An XPath can be indexed by simply adding [1] after each node of the path. XQuery is a declarative language and an XPath can return more than one node; it can return an array of nodes. bodyOrderCtrlAreaCustName implies returning all instances Order under body and all instances of CtrlArea under Order. Therefore, the entire document has to be read in order to correctly process the above XPath. If you know that there is a single instance of Order under body and a single instance of CtrlArea under Order, we could rewrite the above XPath as bodyOrder[1]CtrlArea[1]CustName[1].