Monday, October 8, 2012

DB Adapter Message Throttling in Oracle SOA Suite 11g

DB Adapter Message Throttling in Oracle SOA Suite 11g:


DB throttling is the mechanism to control the number of database records processed by the SOA engine in a particular interval through DB Adapter. 

Throttling also can be used to control the number of records send to the end systems. If the throttling is not defined, the end systems may flood with number of messages that will affect the functioning of the end systems. Throttling parameters should be configured based on the end systems capacity to process the incoming messages.

Until Oracle SOA Suite 11.1.1.6.0 the message throttling will not work as we expect, all the messages matching the where condition of the polling sql are processed in the same polling interval.

As of Oracle Adapters release 11.1.1.6.0 we can set the inbound DBAdapter property RowsPerPollingInterval to control the throttling. It acts as a limit on the number of records which can be processed in one polling interval. The default value is unlimited.

The Patch 12881289 should be applied to enable this for SOA 11.1.1.5.0 and earlier versions.

The maximum rows processed per second

The maximum rows processed per second are:
Number of active nodes in SOA cluster x NumberOfThreads x RowsPerPollingInterval / PollingInterval

MaxTransactionSize can be thought of as RowsPerDatabaseTransaction or DatabaseFetchSize that is how many records will be fetched to DB Adapter engine from the database for each transaction. It does not affect how many rows can be processed in one polling interval period.

The one exception is the following configuration:
-distributed polling checked, usesSkipLocking="false"




Saturday, October 6, 2012

Deployment plan file to replace the JCA Adapters properties – Oracle SOA Suite

Deployment plan file to replace the JCA Adapters properties – Oracle SOA Suite 11g

This post will explain how to use deployment plan file to replace the JCA Adapters properties in Oracle SOA Suite 11g and Oracle SOA Suite 12c.


We can create and edit a configuration plan file in which we can replace the following attributes and properties:
  •  Any composite, service component, reference, service, and binding properties in the SOA composite application file (composite.xml)
  • Attribute values for bindings (for example, the location for binding.ws)
  • schemaLocation attribute of an import in a WSDL file
  • location attribute of an include in a WSDL file
  • schemaLocation attribute of an include, import, and redefine in an XSD file
  • Any properties in JCA adapter files
The configuration plan does not alter XSLT artifacts in the SOA composite application. If you want to modify any XSL, do so in the XSLT Mapper. Using a configuration plan is not useful. For example, you cannot change references in XSL using the configuration plan file. Instead, they must be changed manually in the XSLT Mapper in Oracle JDeveloper when moving to and from test, development, and production environments.

The same steps will work in Oracle SOA Suite 12c but the screens will be little different.

Generate the Plan file:

The plan file can be generated through JDeveloper or through ANT script.

Generating Plan file through JDeveloper:

Right Click on Composite.xml and click on generate config Plan.





Unable to connect to tomcat home page when starting the server from eclipse

Unable to connect to tomcat home page when starting the server from eclipse:


When are we starting the tomcat server from eclipse, the server is getting started successfully as shown below but could not able to access the home – http://localhost:8080from the browser.



Double click the Tomcat server entry in the Servers tab; you'll get the server configuration. At the left column, under Server Locations, select Use Tomcat installation (Make sure no modules are published to do the changes for the existing server configuration)




Changing the weblogic server admin console timeouts.

Changing the weblogic server admin console timeouts.

This post will explain how to change the weblogic server admin console timeouts.

The console application can be find at the below location
$WEBLOGIC_HOME\server\lib\consoleapp

Change the directory location to $WEBLOGIC_HOME/server/lib/consoleapp/webapp/WEB-INF and open the weblogic.xml in a text editor.

Look for a session param tag with the name as "invalidation-interval-secs" and "timeout-secs"

Default Values

<session-descriptor>
    <timeout-secs>3600</timeout-secs>
    <invalidation-interval-secs>60</invalidation-interval-secs>

    <cookie-name>ADMINCONSOLESESSION</cookie-name>
    <cookie-max-age-secs>-1</cookie-max-age-secs>
    <url-rewriting-enabled>false</url-rewriting-enabled>
 </session-descriptor>

Change the value for "invalidation-interval-secs" and "timeout-secs" as per your requirement and restart the Weblogic Admin Server.

Login to weblogic admin console and verify the same.


If the EM console is deployed to weblogic server(EM console will be part of domain if any of the middleware component is installed) then the session timeout can be increased as follows.

Login to EM console and open the MBean Browser(Right click soa-infra-->Administartion-->System MBean Browser)

Enter the following value into the Mbean Browser filter and click on ok.


Change the session timeout value accordingly and click on Apply.




Friday, October 5, 2012

File/FTP Adapter Threading Model – Oracle SOA Suite

File/FTP Adapter Threading Model – Oracle SOA Suite

The Oracle File and FTP Adapters use the following threading models:
  • Default Threading Model
  • Modified Threading Model

Default Threading Model:

In the default threading model, a poller is created for each inbound Oracle File or FTP Adapter endpoint. The poller enqueues file metadata into an in-memory queue, which is processed by a global pool of processor threads. We can set the thread count of global processor through the oracle.tip.adapter.file.numProcessorThreads property at the pc.properties file. Create pc.properties file with this property and copy it to server and then reference it in the WLS classpath in setDomainEnv.sh.




The following steps highlight the functioning of the default threading model:
  • The poller periodically looks for files in the input directory. The interval at which the poller looks for files is specified using the PollingFrequency parameter in the inbound JCA file.
  • For each new file that the poller detects in the configured inbound directory, the poller enqueues information such as file name, file directory, modified time, and file size into an internal in-memory queue.
  • A global pool of processor worker threads waits to process from the in-memory queue.
  • Processor worker threads pick up files from the internal queue, and perform the following actions:
  • Stream the file content to an appropriate translator (for example, a translator for reading text, binary, XML, or opaque data.)
  • Publishes the XML result from the translator to the SCA infrastructure.
  • Performs the required post processing, such as deletion or archival after the file is processed.

Modified Threading Model:

We can modify the default threading behavior of Oracle File and FTP Adapters. Modifying the threading model results in a modified throttling behavior of Oracle File and FTP Adapters. The following sections describe the modified threading behavior of the Oracle File and FTP Adapters:
  • Single Threaded Model
  • Partitioned Threaded Model

Single Threaded Model:

The single threaded model is a modified threaded model that enables the poller to assume the role of a processor. The poller thread processes the files in the same thread. The global pool of processor threads is not used in this model. You can define the property for a single threaded model in the inbound JCA file as follows:
<activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
   <property../>
   <property name="SingleThreadModel" value="true"/>
   <property../>
</activation-spec>

Partitioned Threaded Model:

The partitioned threaded model is a modified threaded model in which the in-memory queue is partitioned and each composite application receives its own in-memory queue. The Oracle File and FTP Adapters are enabled to create their own processor threads rather than depend on the global pool of processor worker threads for processing the enqueued files. You can define the property for a partitioned model in the inbound JCA file as follows:
<activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
  <property../>
  <property name="ThreadCount" value="4"/>
  <property../>
</activation-spec>
In the preceding example for defining the property for a partitioned model:
  • If the ThreadCount property is set to 0, then the threading behavior is like that of the single threaded model.
  • If the ThreadCount property is set to -1, then the global thread pool is used, as in the default threading model.
  • The maximum value for the ThreadCount property is 40.