43 Managing Large Documents and Large Numbers of Instances

This chapter describes the best practices for managing large documents and metadata and for managing environments with large numbers of instances in Oracle SOA Suite.

This chapter includes the following sections:

For more information about Oracle SOA Suite tuning and performance, see Oracle Fusion Middleware Performance and Tuning Guide.

43.1 Best Practices for Handling Large Documents

This section describes the following scenarios for handling large documents and the best practice approach for each scenario. Oracle recommends that you follow these best practices before developing and executing large payloads.

43.1.1 Use Cases for Handling Large Documents

This section describes use cases for handling large documents.

43.1.1.1 Passing Binary Objects as Base64-Encoded Text in XML Payloads

This section describes use cases for passing binary objects as Base64-encoded text in the XML payload.

43.1.1.1.1 SOAP Inline

In this use case, the binary attachments (for example, an image) are Base64-encoded as text and then passed inline in the XML document. Table 43-1 provides details.

Table 43-1 Capabilities

Capability Description

Security

Supported.

Filter/Transformation/Assign

Use of transformations may lead to slower performance, out-of-memory errors, or both.

Fanout

Supported.

Binding

WS binding sends it as a document object model (DOM).

Oracle BPEL Process Manager/Oracle Mediator

Can be decoded in a BPEL process using Java exec.


43.1.1.1.2 SOAP MTOM

In this use case, the binary attachments (for example, an image) are Base64-encoded as text and then passed as a Message Transmission Optimization Mechanism (MTOM) document. Table 43-2 provides details.

Table 43-2 Capabilities

Capability Description

Security

Supported.

Filter/Transformation/Assign

Assign activities are supported.

Fanout

Supported.

Binding

WS binding materializes the attachment sent as MTOM and puts it inside in Base64-encoded format (streaming is not supported). Outbound MTOM is not supported.

Oracle BPEL Process Manager/Oracle Mediator

No additional work is required.


43.1.1.1.3 Opaque Passed by File/FTP Adapters

In this use case, the binary attachments (for example, an image) are Base64-encoded as text and then passed inline in the XML document. Table 43-3 provides details.

Table 43-3 Capabilities

Capability Description

Security

Not supported.

Filter/Transformation/Assign

Pass through.

Fanout

Supported.

Binding

Adapter encodes it to Base64 format.

Oracle BPEL Process Manager/Oracle Mediator

Supported. Opaque content cannot be manipulated in an assign or a transformation activity.


43.1.1.1.4 Opaque Passed by Oracle B2B

In this use case, the binary attachments (for example, an image) are Base64-encoded as text encoded. Table 43-4 provides details.

Table 43-4 Capabilities

Capability Description

Security

Not supported.

Filter/Transformation/Assign

Pass through.

Fanout

Supported.

Oracle B2B

Oracle B2B encodes the native payload to Base64 format. For this, you must configure the Oracle B2B binding document definition handling to be opaque.


43.1.1.2 End-to-End Streaming with Attachments

This section describes use cases for end-to-end streaming of attachments.

43.1.1.2.1 SOAP with Attachments

In this use case, the binary attachments (for instance an image) are passed end-to-end as a stream. Table 43-5 provides details.

Table 43-5 Capabilities

Capability Description

Security

Not supported.

Filter/Transformation/Assign

Pass through. You must use an XPath extension function in Oracle BPEL Process Manager.

Fanout

Not supported.

Binding

WS binding creates stream iterators for the SOAP attachment.

Oracle BPEL Process Manager/Oracle Mediator

Oracle Mediator can perform a pass through without materializing it for synchronous routing rules (asynchronous routing rules are not supported). Oracle BPEL Process Manager persists it.

Tuning

Manage the database tablespace when using with Oracle BPEL Process Manager.

WSDL Code for defining SOAP with attachments

<mime:part>
   <mime:content part="bin" type=“image/jpeg"/>
</mime:part>

Notes:

  • You cannot stream attachments as part of a web service callback response.

  • Deferred routing rules within Oracle Mediator do not support processing of attachments.

  • The spring service component does not support processing MIME attachments. Only MTOM attachments are supported.

  • You can use various binding components such as direct binding, web services, HTTP, and so on to process large attachments. However, processing large attachments with direct binding is not recommended and results in out-of-memory errors.

Working with Streaming Attachments

Oracle Fusion Middleware web services enable you to pass large attachments as a stream. Unlike the JAX-RPC API, which treats attachments as if they are entirely in memory, streams make the programming model more efficient to use. Streams also enhance performance and scalability because there is no need to load the attachment into memory before service execution.

As with embedded attachments, streamed attachments conform to the multipart MIME binary format. On the wire, messages with streamed attachments are identical to any other SOAP message with attachments.

Example 43-1 provides a sample message with a streamed attachment. The first part in the message is the SOAP envelope (<SOAP-ENV:Envelope...). The second part is the attachment (for this example, myImage.gif).

Example 43-1 Sample Message with a Streamed Attachment

MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml;
Content-Description: This is the optional message description.

--MIME_boundary
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: NotSure/DoesntMatter

<?xml version='1.0' ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
. . .
<DocumentName>MyImage.gif</DocumentName>
. . .
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--MIME_boundary
Content-Type: image/gif
Content-Transfer-Encoding: binary
Content-ID: AnythingYoudLike

...binary GIF image...
--MIME_boundary--

Creating Composites that Use MIME Attachments

Perform the following procedures to create composites that use MIME attachments.

  1. Create a composite using a payload schema (for example, an inbound web service wired to an Oracle Mediator wired to an outbound web service).

  2. Within the WSDL file of Oracle Mediator, perform the following steps:

    1. From the WSDL designer, open the Oracle Mediator WSDL file.

    2. Drag and drop bindings into the middle swimlane.

    3. Select the RPC binding.

    4. Enter a name.

    5. Go to Source view of the WSDL and modify the WSDL input and WSDL output with MIME multiparts, as shown in Example 43-2.

      Example 43-2 MIME Multiparts

      <wsdl:input>
            <mime:multipartRelated>
                <mime:part>
                    <soap:body parts="payload" use="literal"/>
                </mime:part>
                <mime:part>
                    <mime:content part="bin" type="application/octet-stream"/>
                </mime:part>
            </mime:multipartRelated>
      </wsdl:input>
      
    6. Add the MIME part in the request/response message, as shown in Example 43-3.

      Example 43-3 MIME Part in Request/Response Message

      <wsdl:message name="BPELProcess1RequestMessage">
          <wsdl:part name="payload" element="ns1:purchaseOrder" />
          <!--add below part-->
          <wsdl:part name="bin" type="xsd:base64Binary"/>
      </wsdl:message>
      
    7. Add a namespace in the WSDL definitions, as shown in Example 43-4.

      Example 43-4 Namespace

      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
      

When complete, the WSDL that references a MIME attachment displays as shown in Example 43-5.

Example 43-5 Sample WSDL

<wsdl:definitions
  name="PhotoCatalogService"
  targetNamespace="http://examples.com/PhotoCatalog"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:types="http://examples.com/PhotoCatalog/types"
  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
  xmlns:tns="http://examples.com/PhotoCatalog">
  <wsdl:message name="addPhotoRequest">
    <wsdl:part name="photo" type="xsd:hexBinary"/>
  </wsdl:message>
  <wsdl:message name="addPhotoResponse">
    <wsdl:part name="status" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="replacePhotoRequest">
    <wsdl:part name="oldPhoto" type="xsd:string"/>
    <wsdl:part name="newPhoto" type="xsd:hexBinary"/>
  </wsdl:message>
  <wsdl:message name="replacePhotoResponse">
    <wsdl:part name="status" type="xsd:string"/>
  </wsdl:message>
  <wsdl:portType name="PhotoCatalog">
    <wsdl:operation name="addPhoto">
      <wsdl:input message="tns:addPhotoRequest"/>
      <wsdl:output message="tns:addPhotoResponse"/>
    </wsdl:operation>
    <wsdl:operation name="replacePhoto">
      <wsdl:input message="tns:replacePhotoRequest"/>
      <wsdl:output message="tns:replacePhotoResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="PhotoCatalogBinding" type="tns:PhotoCatalog">
    <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="addPhoto">
      <wsdl:input>
        <mime:multipartRelated>
          <mime:part>
            <soap:body use="literal"/>
          </mime:part>
          <mime:part>
            <mime:content part="photo"
                          type="image/jpeg"/>
          </mime:part>
        </mime:multipartRelated>
      </wsdl:input>
      <wsdl:output>
        <mime:multipartRelated>
          <mime:part>
            <soap:body use="literal"/>
          </mime:part>
          <mime:part>
            <mime:content part="status" type="text/plain"/>
            <mime:content part="status" type="text/xml"/>
          </mime:part>
        </mime:multipartRelated>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="replacePhoto">
      <wsdl:input>
        <mime:multipartRelated>
          <mime:part>
            <soap:body parts="oldPhoto" use="literal"/>
          </mime:part>
          <mime:part>
            <mime:content part="newPhoto"
                          type="image/jpeg"/>
          </mime:part>
        </mime:multipartRelated>
      </wsdl:input>
      <wsdl:output>
            <soap:body parts="status" use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
</wsdl:definitions>

Performance Overhead and Pass Through Attachments

Because Oracle Mediator is stateless, there is no performance overhead with pass through attachments. However, Oracle BPEL Process Manager dehydrates attachments and has performance overhead, even for pass through attachments. Using Oracle BPEL Process Manager for attachments over a period of time, the SOA Infrastructure schema can grow to its maximum size and encounter memory issues. It is recommended that you extend the database tablespace appropriately for the SOA Infrastructure schema to accommodate large attachments.

In scenarios in which one BPEL process calls a second BPEL process within the same composite, the second BPEL process does not dehydrate the same attachment again.

In scenarios in which one BPEL process from composite 1 invokes a second BPEL process from composite 2 and optimization is disabled, composite 1 makes a SOAP call to composite 2. The second BPEL process does dehydrate attachments.

Properties for Streaming Attachments

To stream attachments, add the following properties in the composite.xml file. If optimization is enabled, then a native call is used instead of a SOAP call. Example 43-6 provides details.

Example 43-6 Properties for Streaming Attachments

<binding.ws
port="http://services.otn.com#wsdl.endpoint(MIMEService/MIMEService)"
xmlns:ns="http://xmlns.oracle.com/sca/1.0"
streamIncomingAttachments="true" streamOutgoingAttachments="true">
<!--Add this prop to reference bindings to make a SOAP call. -->
<property name="oracle.webservices.local.optimization">false</property>
</binding.ws>

For information about the oracle.webservices.local.optimization property, see "Managing SOA Composite Application Policies" in the Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

Note:

Oracle Web Services Manager (OWSM) does not inspect or enforce policies on streamed attachments. For more information about OWSM, see Oracle Fusion Middleware Security and Administrator's Guide for Web Services.

Reading and Encoding SOAP Attachment Content

The ora:getAttachmentContent function reads SOAP attachment content and encodes that data in Base64 format in a BPEL process by providing the BPEL variable as an argument, which has an href of the SOAP attachment. Example 43-7 shows how to use this function:

Example 43-7 ora:getAttachmentContent Function

<copy>
   <from expression="ora:getAttachmentContent('input','bin')"/>
   <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:attachment/task:content"/>
</copy>

Example 43-7 copies the attachment content, which has its href stored in the "input/bin" variable to the content variable, in Base64-encoded format.

Sending Attachment Streams

Oracle Mediator can pass an attachment stream to only one target receiver. The receiver can be another component or a web service/adapter. The second target cannot receive the attachment. Oracle BPEL Process Manager supports sending the attachment stream to multiple receivers. For Oracle BPEL Process Manager to send a stream to multiple receivers, it must read the attachment stream from the database using the readBinaryFromFile XPath function and pass the stream to the appropriate targets.

Sharing Attachments Using Synchronous Flows

When Oracle BPEL Process Manager-based composites share attachments using synchronous flows, it is necessary to use the same end-to-end transaction. This is applicable to composites that are colocated and use local/optimized calls. This can be achieved by setting the property shown in Example 43-8 on all the called BPEL components (callees) in the call chain.

Example 43-8 bpel.config.transaction Property

<property name="bpel.config.transaction" many="false"
type="xs:string">required</property>

If such composites do not execute as part of the same transaction context, the attachment data saved by the first BPEL component in the call chain is not visible to the other BPEL components in the call chain. In addition, they incur database locking and timeout exceptions:

"ORA-02049: timeout: distributed transaction waiting for lock"
43.1.1.2.2 Attachment Options of File/FTP Adapters

In this use case, the adapter streams the binary data to a database store and publishes an href to the service engine (Oracle BPEL Process Manager or Oracle Mediator). Table 43-6 provides details.

Table 43-6 Capabilities

Capability Description

Security

N/A.

Filter/Transformation/Assign

Filters and transformations on the attachment are not supported.

Fanout

Supported.

Binding

The adapter streams the non-XML to the database as a binary large object (BLOB) and passes the key to the service engines.

Oracle BPEL Process Manager/Oracle Mediator

Supported.

Tuning

  • Extend the database tablespace for the Oracle SOA Suite schema.

  • Delete the attachments after message processing completion.

Documentation

See Oracle Fusion Middleware User's Guide for Technology Adapters.


Writing Attachments Using an Outbound File Adapter

Example 43-9 shows a sample schema that can be used by the file adapter to write attachments to disk.

Example 43-9 Schema for Writing Attachments to Disk

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://xmlns.oracle.com/attachment"
            targetNamespace="http://xmlns.oracle.com/attachment"
            elementFormDefault="qualified">
            <xsd:element name="attach">
              <xsd:complexType>
                 <xsd:attribute name="href" type="xsd:string"/>
              </xsd:complexType>
  </xsd:element>
</xsd:schema>

Use Oracle Mediator in the flow to map the attachment part from the source (Oracle Mediator) to the target (file adapter) using an Oracle Mediator assign.

If you use Oracle BPEL Process Manager, the attachment is written to the dehydration store, which slows down the process.

Transforming Attachments with the ora:doStreamingTranslate XPath Function

Use of the ora:doStreamingTranslate XPath function is only recommended while transforming attachments within an Oracle BPEL Process Manager/Oracle Mediator composite. This function expects the attachment location to be a relative path on the server. This function cannot translate incoming attachment streams.

For more information about this function, see Section B.2.6, "doStreamingTranslate."

43.1.1.2.3 Oracle B2B Attachment

In this use case, Oracle B2B stores the binary data to a database and publishes an href to the service engine (Oracle BPEL Process Manager or Oracle Mediator) based on an Oracle B2B-defined XSD. Oracle B2B protocols define the attachment. Table 43-7 provides details.

Table 43-7 Capabilities

Capability Description

Security

N/A.

Filter/Transformation/Assign

Filters and transformations on the attachment are not supported.

Fanout

Supported.

Binding

Oracle B2B passes it as an href key to service engines.

Tuning

Extend the database tablespace for the Oracle SOA Suite schema.


43.1.1.3 Processing Large XML with Repeating Constructs

This section describes use cases for processing large XML with repeating constructs.

43.1.1.3.1 Debatching with the File/FTP Adapter

In this use case, the inbound adapter splits a source document into multiple batches of records, each of which initiates a composite instance. Table 43-8 provides details.

Table 43-8 Capabilities

Capability Description

Security

N/A.

Filter/Transformation/Assign

Supported.

Fanout

Supported.

Binding

The file/FTP adapter debatches it to a small chunk based on the native XSD (NXSD) definition.

Oracle BPEL Process Manager/Oracle Mediator

Supported.

Tuning

For repeating structures, XSLT is supported for scenarios in which the repeating structure is of smaller payloads compared to the overall payload size. Substitution with assign activities is preferred, as it performs a shadow copy.

Documentation

See Oracle Fusion Middleware User's Guide for Technology Adapters.


43.1.1.3.2 Chunking with the File/FTP Adapters

In this use case, a loop within a BPEL process reads a chunk of records at a time and process (that is, cursor). Table 43-9 provides details.

Table 43-9 Capabilities

Capability Description

Security

Supported.

Filter/Transformation/Assign

Supported.

Fanout

Supported.

Oracle BPEL Process Manager/Oracle Mediator

Supported only from Oracle BPEL Process Manager.

Documentation

See Oracle Fusion Middleware User's Guide for Technology Adapters.


43.1.1.4 Processing Large XML Documents with Complex Structures

This section describes use cases for processing very large XML documents with complex structures.

43.1.1.4.1 Streaming with the File/FTP Adapters

In this use case, very large XML files are streamed through Oracle SOA Suite. Table 43-10 provides details.

Table 43-10 Capabilities

Capability Description

Security

N/A.

Filter/Transformation/Assign

Supported, but must optimize to avoid issues.

Fanout

Supported.

Binding

The adapter streams the payload to a database as an SDOM and passes the key to the service engines.

Documentation

See Oracle Fusion Middleware User's Guide for Technology Adapters.


43.1.1.4.2 Oracle B2B Streaming

In this use case, large XML files are passed by Oracle B2B to Oracle SOA Suite as an SDOM. This only occurs when a large payload size is defined in the Oracle B2B user interface. Table 43-11 provides details.

Table 43-11 Capabilities

Capability Description

Security

N/A.

Filter/Transformation/Assign

Supported, but must optimize to avoid issues.

Fanout

Supported.

Binding

Oracle B2B streams the payload to a database as SDOM and passes the key to the service engines.

Oracle BPEL Process Manager/Oracle Mediator

Can use an XPath extension function to manipulate the payload.


43.1.2 Limitations on Concurrent Processing of Large Documents

This section describes the limitations on concurrent processing of large documents.

43.1.2.1 Opaque Schema for Processing Large Payloads

There is a limitation when you use an opaque schema for processing large payloads. The entire data for the opaque translator is converted to a single Base64-encoded string. An opaque schema is generally used for smaller data. For large data, use the attachments feature instead of the opaque translator.

For more information about the usage of these functions, see Oracle Fusion Middleware User's Guide for Technology Adapters.

43.1.2.2 Streaming MTOM Attachments

The incoming requests for streaming MTOM attachments that are passed through the Service Infrastructure are normalized, and the processing of such messages are not optimized inside the Service Infrastructure layer.

43.1.3 General Tuning Recommendations

This section provides general tuning recommendations.

For more information about Oracle SOA Suite tuning and performance, see Oracle Fusion Middleware Performance and Tuning Guide.

43.1.3.1 General Recommendations

This section provides general tuning recommendations.

  • Increase the JTA transaction timeout to 500 seconds in Oracle WebLogic Server Administration Console. For instructions, see section "Resolving Connection Timeouts" of Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

  • In Oracle Enterprise Manager Fusion Middleware Control Console, set the audit level to Off or Production at the SOA composite application level. See Section 43.1.3.2, "Setting Audit Levels from Oracle Enterprise Manager for Large Payload Processing" for additional information.

  • Uncomment the following line in setDomainEnv.sh for JAVA_OPTIONS, and restart the server. If this line does not exist, add it. Without this setting, large payload scenarios fail with ResourceDisabledException for the dehydration data source.

    -Dweblogic.resourcepool.max_test_wait_secs=30
    
  • Update the heap size in setSOADomainEnv.sh as follows:

    DEFAULT_MEM_ARGS="-Xms1024m -Xmx2048m"
    
  • Use optimized translation functions, which are available while performing transformations and translations of large payloads (for example, ora:doTranslateFromNative, ora:doTranslateToNative, ora:doStreamingTranslate, and so on).

  • Extend data files for handling large attachments. For more information, see the Oracle Database Administrator's Guide.

    http://download-west.oracle.com/docs/cd/B28359_01/server.111/b28310/toc.htm
    
  • If you are processing large documents and run into timeout errors, perform the following tasks:

    • Increase the timeout property value

    • Increase the Stuck Thread Max Time property value

    Increase the timeout property value as follows:

    1. Log in to Oracle Web Services Manager Administration Console.

    2. Navigate to Deployments > soa-infra > EJBs.

    3. Click each of the following beans, select Configuration, and increase the timeout value:

      • BpelEngineBean

      • BpelDeliveryBean

      • CompositeMetaDataServiceBean

    Increase the Stuck Thread Max Time property value as follows:

    1. Follow the instructions in Chapter "Using the WebLogic 8.1 Thread Pool Model" of Oracle Fusion Middleware Performance and Tuning for Oracle WebLogic Server.

43.1.3.2 Setting Audit Levels from Oracle Enterprise Manager for Large Payload Processing

For large payload processing, turn off audit level logging for the specific composite. You can set the composite audit level option to Off or Production in Oracle Enterprise Manager Fusion Middleware Control Console. If you set the composite audit level option to Development, then it serializes the entire large payload into an in-memory string, which can lead to an out-of-memory error.

For more information about setting audit levels, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

43.1.3.3 Using the Assign Activity in Oracle BPEL Process Manager/Oracle Mediator

When using the assign activity in Oracle BPEL Process Manager or Oracle Mediator to manipulate large payloads, do not assign the complete message. Instead, assign only the part of the payload that you need.

In addition, when using the assign activity in Oracle BPEL Process Manager, Oracle recommends using local variables instead of process variables, wherever possible. Local variables are limited to the scope of the BPEL process. These get deleted from memory and from the database after you close the scope. However, the life cycle of a global variable is tied with the instance life cycle. These variables stay in memory or remain on disk until the instance completes. Thus, local variables are preferred to process or global variables.

43.1.3.4 Using XSLT Transformations on Large Payloads (For Oracle BPEL Process Manager and Oracle Mediator)

Oracle recommends that you not apply the XSLT Transformation on large payloads because this results in out-of-memory errors when XSLT must traverse the entire document.

43.1.3.5 Using XSLT Transformations for Repeating Structures

In scenarios in which the repeating structure is of smaller payloads compared to the overall payload size, Oracle recommends using XSLT transformation because the current XSLT implementation materializes the entire DOM in memory. For example, use PurchaseOrder.LineItem.Supplier (a subpart of a large payload).

You can also substitute it with the assign activity, as it performs a shadow copy. Although a shadow copy does not materialize DOM, it creates a shadow node to point to the source document.

You can also use the following optimized translation functions while performing transformations/translations of large payloads:

  • ora:doTranslateFromNative

  • ora:doTranslateToNative

  • ora:doStreamingTranslate

For more information about the usage of these functions, see Oracle Fusion Middleware User's Guide for Technology Adapters.

43.1.3.6 Processing Large Documents in Oracle B2B

For processing large documents in Oracle B2B, tune the following parameters:

  • MDSInstance

  • Cache Size

  • Protocol Message Size

  • Number of threads

  • Stuck Thread Max Time

  • Tablespace

The following sections describe the parameters you must set for processing large documents in Oracle B2B:

43.1.3.6.1 MDSInstance Cache Size

To set MDSInstance cache size, the property and value must be added to the $DOMAIN_HOME/config/soa-infra/configuration/b2b-config.xml file, as shown in Example 43-10.

Example 43-10 MDSInstance Cache Size

<property>
 <name>b2b.mdsCache</name>
 <value>200000</value>
 <comment>MDS Instance cache size </comment>
</property>
43.1.3.6.2 Protocol Message Size

If Oracle B2B wants to send or receive more than 10 MB of message or the import/export configuration is more than 10 MB, then the following setting must be changed accordingly in the Oracle WebLogic Server Administration Console:

  1. In the Domain Structure, select Environment > Servers.

  2. In the Name column of the table, select soa_server.

  3. Select the Protocols tab.

  4. Change the value for Maximum Message Size.

This setting can also be added/modified in the $DOMAIN_HOME/config/config.xml file next to the server name configuration, as shown in Example 43-11.

Example 43-11 max-message-size Property

<name>soa_server1</name>
<max-message-size>150000000</max-message-size> 

Note:

By default, max-message-size is not available in the config.xml file.
43.1.3.6.3 Number of Threads

This parameter helps to improve the message processing capability of Oracle B2B and must be set in the $DOMAIN_HOME/config/soa-infra/configuration/b2b-config.xml file. Example 43-12 provides an example.

Example 43-12 Number of Threads

<property>
  <name>b2b.inboundProcess.threadCount</name>
  <value>5</value>
  <comment></comment>
</property>
<property>
  <name>b2b.inboundProcess.sleepTime</name>
  <value>10</value>
  <comment></comment>
</property>
<property>
  <name>b2b.outboundProcess.threadCount</name>
  <value>5</value>
  <comment></comment>
</property>
<property>
  <name>b2b.outboundProcess.sleepTime</name>
  <value>10</value>
  <comment></comment>
</property>
<property>
  <name>b2b.defaultProcess.threadCount</name>
  <value>5</value>
  <comment></comment>
</property>
<property>
  <name>b2b.defaultProcess.sleepTime</name>
  <value>10</value>
  <comment></comment>
</property> 
43.1.3.6.4 Stuck Thread Max Time

The Stuck Thread Max Time parameter checks the number of seconds that a thread must be continually working before the server considers the thread stuck. You must change the following setting in the Oracle WebLogic Server Administration Console:

  1. In the Domain Structure, select Environment > Servers.

  2. In the Name column of the table, select soa_server.

  3. Select the Tuning tab.

  4. Change the value for Stuck Thread Max Time.

43.1.3.6.5 Tablespace

If you must store more than a 150 MB configuration in the data file, then you must extend or add the data file to increase the tablespace size, as shown in Example 43-13.

Example 43-13 Extension of Data File

ALTER TABLESPACE sh_mds add DATAFILE 'sh_mds01.DBF' SIZE 100M autoextend on next
 10M maxsize unlimited;
ALTER TABLESPACE sh_ias_temp add TEMPFILE 'sh_ias_temp01.DBF' SIZE 100M autoextend
 on next 10M maxsize unlimited;

43.2 Best Practices for Handling Large Metadata

This section provides recommendations for handling large metadata.

43.2.1 Boundary on the Processing of Large Numbers of Activities in a BPEL Process

There is a limit to the number of activities that can be executed in a BPEL process. When you exceed this limit, system memory fills up, which can cause timeouts to occur. For example, with the following parameters, two fault instances occur due to a timeout:

  • 100 threads

  • 1 second of think time

  • 1000 incoming request messages

Try to keep the number of incoming request messages at a proper level to ensure system memory stability.

43.2.2 Using Large Numbers of Activities in BPEL Processes (Without FlowN)

To deploy BPEL processes that have a large number of activities (for example, 50,000), the following settings are required:

MEM_ARGS: -Xms512m -Xmx1024m -XX:PermSize = 128m -XX:MaxPermSize = 256m

Number of Concurrent Threads = 20

Number of Loops = 5 Delay = 100 ms

The above settings enable you to deploy and execute BPEL processes, which use only while loops without the flowN activities, successfully.

43.2.3 Using Large Numbers of Activities in BPEL Processes (With FlowN)

To deploy BPEL processes that have a large number of activities (for example, 50,000), the following settings are required:

USER_MEM_ARGS: -Xms2048m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=256m

Number of Concurrent Threads= 10

Number of Loops=5 Delay=100 ms

Set the StatsLastN property to -1 in the System MBean Browser of Oracle Enterprise Manager Fusion Middleware Control Console.

The above settings enable you to deploy and execute BPEL processes, which use the flowN activities, successfully.

For more information, see Chapter 9, "Using Parallel Flow in a BPEL Process."

43.2.4 Using a Flow With Multiple Sequences

BPEL processes that have up to 7000 activities can be deployed and executed successfully with the following settings:

USER_MEM_ARGS: -Xms2048m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=256m

Note:

If you deploy BPEL processes with more than 8000 activities, Oracle BPEL Process Manager compilation throws errors.

43.2.5 Using a Flow with One Sequence

BPEL processes that have up to 7000 activities can be deployed and executed successfully with the following settings:

USER_MEM_ARGS: -Xms2048m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=512m

Note:

If you deploy BPEL processes with more than 10,000 activities, the Oracle BPEL Process Manager compilation fails.

43.2.6 Using Flow with No Sequence

You can deploy and execute BPEL processes that have a large number of activities (for example, up to 5000) successfully.

There is a probability that the BPEL compilation could fail for 6000 activities.

43.2.7 Large Numbers of Oracle Mediators in a Composites

Oracle recommends that you not have more than 50 Oracle Mediators in a single composite. Increase the JTA Transaction timeout to a high value based on the environment.

43.2.8 Importing Large Data Sets in Oracle B2B

Oracle recommends that you do not use browsers for large data set imports, and that you use the command-line utility. The following utility commands are recommended for large data configuration:

  • purge: This command is used to purge the entire repository.

  • import: This command is used to import the specified ZIP file.

  • deploy: This command is used to deploy an agreement with whatever name is specified. If no name is specified, then all the agreements are deployed.

However, the purgeimportdeploy option is not recommended to be used for transferring or deploying the Oracle B2B configuration.

43.3 Best Practices for Handling Large Numbers of Instances

This section provides recommendations for handling large numbers of instance and fault metrics.

43.3.1 Instance and Rejected Message Deletion with the Purge Script

Deleting thousands of instances and rejected messages in Oracle Enterprise Manager Fusion Middleware Control Console takes time and can result in a transaction timeout. If you must perform this task, use the purge_soainfra_oracle.sql PL/SQL script for instance and rejected message deletion.

For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

43.3.2 Improving the Loading of Pages in Oracle Enterprise Manager Fusion Middleware Control Console

You can improve the loading of pages that display large amounts of instance and fault data in Oracle Enterprise Manager Fusion Middleware Control Console by setting two properties in the Display Data Counts section of the SOA Infrastructure Common Properties page.

These two properties enable you to perform the following:

  • Disable the fetching of instance and fault count data to improve loading times for the following pages:

    • Dashboard pages of the SOA Infrastructure, SOA composite applications, service engines, and service components

    • Delete with Options: Instances dialog

    This setting disables the loading of all metrics information upon page load. For example, on the Dashboard page for the SOA Infrastructure, the values that typically appear in the Running and Total fields in the Recent Composite Instances section and the Instances column of the Deployed Composites section and replaced with links. When these values are large, it can take time to load this page and other pages with similar information.

  • Specify a default time period that is used as part of the search criteria for retrieving recent instances and faults for display on the following pages:

    • Dashboard pages and Instances pages of the SOA Infrastructure, SOA composite applications, service engines, and service components

    • Dashboard pages of services and references

    • Faults and Rejected Messages pages of the SOA Infrastructure, SOA composite applications, services, and references

    • Faults pages of service engines and service components

For more information about setting these properties, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.