Using Business Events in Fusion-based SaaS with Oracle Integration Cloud Service – Part 3: Event Filter Expressions

In the previous two posts, Part 1 and Part 2, we gave an overview which Business Events are available in R13 and how you can subscribe to events with external applications using Oracle ICS/OIC. In this part, we will show how to filter events using XPath expressions. Use Cases for Filtering Business Events The approach […]

Using Business Events in Fusion-based SaaS with Oracle Integration Cloud Service – Part 2: Step-by-Step Example

Following the overview in Part 1, I will now show detailed steps how to create the event subscriptions. In our example, we will use an “Item Creation” event (from SCM cloud). Prerequisite: Register CSF Key in SaaS In a FA-based SaaS instance, the outbound call of a webservice uses a OWSM security policy which retrieves the […]

Using Business Events in Fusion-based SaaS with Oracle Integration Cloud Service – Part 1: Overview

Introduction For integration with all Oracle Fusion based Cloud services – like Oracle Sales Cloud and Oracle SCM Cloud, each service provides Business Events which external applications or integrations can subscribe to. Oracle Integration Cloud Service (ICS) or the new offering Oracle Integration Cloud (OIC) allow very easily to receive (subscribe) to these events and […]

Using the Oracle SCM Cloud R12 REST API

Overview Starting with Release 12, Oracle SCM Cloud provides a REST API – which is easier to use in a lot of cases than the SOAP API and also offers some additional capabilities like the access to the WorkOrder service. Also it can be very easily used by the Oracle IoT Cloud Service and Oracle […]

Using eBS Adapter in Integration Cloud Service – Part 2: Configure and Test ISG REST Services

Introduction Integration Cloud Service (ICS) enables connecting applications in the cloud or on-premise. It also provides an adapter for Oracle eBusiness Suite. This eBS adapter is different than the eBS adapter in SOA Suite – it does not use a database connection. Instead it uses the REST services provided by eBS as part of Integrated […]

Using eBS Adapter in Integration Cloud Service – Part 1: Installing eBusiness Suite Integrated SOA Gateway for REST Services

Introduction Integration Cloud Service (ICS) enables connecting applications in the cloud or on-premise. It also provides an adapter for eBusiness Suite. This eBS adapter is different than the eBS adapter in SOA Suite – it does not use a database connection. Instead it uses the REST services provided by eBS as part of Integrated SOA Gateway […]

Inside Fusion Middleware 12c: Increasing Scalability with JMS Adapter 12c

JMS Adapter (also known as Oracle JCA Adapter for JMS) is a component available with Oracle SOA Suite or Oracle Service Bus (OSB) which provides a very powerful way to use  the Java Messaging Service (JMS) for sending or receiving messages. The most important goals for optimizing an SOA Suite or OSB environment are to […]

New AIA 11g Performance Tuning Whitepaper available!

The Oracle A-Team has published a new AIA 11g performance tuning whitepaper – see
http://bit.ly/YQKh22
This summary shows step-by-step how to increase throughput and response time by doing this as an exercise with the AIA 11.2 O2C COMMS PIP.

AIA/SOA 11g Trips & Tricks: How to Save AIA/BPEL 11g Execution Time Statistics Programmatically in a File

Accessing and saving statistics is quite different in SOA 11g – this is done through JXM MBeans and not anymore by calling a BPEL API.

The following example shows how to retrieve the execution time statistics for all BPEL components deployed to one SOA server.

The example output is:

FOUND 15
Time    BPEL Name    Count    Min    Avg    Max
11:48:19    ProcessFOBillingAccountListRespOSMCFSCommsJMSProducer    6    326    2568.6666666666665    3068
11:48:19    UpdateSalesOrderSiebelCommsProvABCSImplProcess    6    1482    1821.5    2236
11:48:19    CommsProcessFulfillmentOrderBillingAccountListEBF    6    16590    22458.5    29167
11:48:19    ProcessFulfillmentOrderBillingResponseOSMCFSCommsJMSProducer    6    28    166.5    842
11:48:19    AIAAsyncErrorHandlingBPELProcess    4    1459    1758.5    2065
11:48:19    ProcessFulfillmentOrderBillingBRMCommsProvABCSImplProcess    6    1805    2462.8333333333335    4031
11:48:19    QueryCustomerPartyListSiebelProvABCSImplV2    10    640    2639.8    11079
11:48:19    AIASessionPoolManager    20    13    96.0    1344
11:48:19    ProcessSalesOrderFulfillmentOSMCFSCommsJMSProducer    10    94    562.9    1930
11:48:19    ProcessFulfillmentOrderBillingBRMCommsAddSubProcessProcess    6    773    1211.0    1577
11:48:19    SyncCustomerPartyListBRMCommsProvABCSImpl    10    323    2956.0    4045
11:48:19    TestOrderOrchestrationEBF    6    39979    46680.166666666664    52206
11:48:19    ProcessSalesOrderFulfillmentSiebelCommsReqABCSImplProcess    10    1125    2247.1    6522
11:48:19    CommsProcessBillingAccountListEBF    10    7342    12365.5    22876
11:48:19    AIAReadJMSNotificationProcess    4    9    54.5    124

You can easily paste the output in Excel to display charts like:

image

image

You also can periodically retrieve the statistics to determine if there is any performance degrade for some BPEL processes over time.

Lets see how the JMX API is used to achieve this:

First we need to establish a connection to the MBean server – for this we use the same method as we did in our JMXClient:

public static void initConnection(String hostname, String portString,
                                  String username,
                                  String password) throws IOException,
                                                          MalformedURLException {
    String protocol = “iiop”;

    Integer portInteger = Integer.valueOf(portString);
    int port = portInteger.intValue();
    String jndiroot = “/jndi/”;
    String mserver = “weblogic.management.mbeanservers.domainruntime”;

    JMXServiceURL serviceURL =
        new JMXServiceURL(protocol, hostname, port, jndiroot + mserver);

    Hashtable h = new Hashtable();
    h.put(Context.SECURITY_PRINCIPAL, username);
    h.put(Context.SECURITY_CREDENTIALS, password);
    h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
          “weblogic.management.remote”);
    // Wait timeout 60 seconds
    h.put(“jmx.remote.x.request.waiting.timeout”, new Long(60000));
    connector = JMXConnectorFactory.connect(serviceURL, h);
    connection = connector.getMBeanServerConnection();
}

After that we retrieve all Mbeans which have the same pattern:

String mBeanName =
    “oracle.dms:Location=” + servername + “,soainfra_composite_label=*,type=soainfra_component,soainfra_component_type=bpel,soainfra_composite=*,soainfra_composite_revision=*,soainfra_domain=default,name=*”;

Set<ObjectInstance> mbeans =
    connection.queryMBeans(new ObjectName(mBeanName), null);
System.out.println(“FOUND ” + mbeans.size());

This matches the display in Enterprise Manager “System MBean Browser”:

EM2

Now, we can query each MBean for the attributes

  • Name
  • successfulInstanceProcessingTime_completed
  • successfulInstanceProcessingTime_minTime
  • successfulInstanceProcessingTime_avg
  • successfulInstanceProcessingTime_maxTime

That’s it!

You can find the complete JDeveloper project here.

The same statistics can of course be retrieved as well programmatically for composites (services) and references.

SOA Tips & Tricks Series: Preventing OOM Exceptions with Very Large Audit Trails

In very complex flows, audit trail or flow trace sizes can grow above the limit where EM console will display this correctly with the default settings. The reason is to prevent from generating huge audit trail objects in memory and thus potentially causing OOM errors – therefore the standard limit is set to 1 MB.

You will see the following exception in a case where the audit trail exceeds this limit:

Exception occured while retrieving the Flowtrace XML for the Composite Instance; ECID: 9c37958941ffc184:-3503c179:138e19ea68a:-8000-0000000000002ee6
java.rmi.RemoteException: EJB Exception: ; nested exception is: 
   java.lang.RuntimeException: oracle.soa.management.facade.DataSetTooLargeException: Requested audit trail size is larger than threshold 1048576 chars
   at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
   …

 

If this is not a design or implementation error (for example an indefinite loop), then you can try to increase this audit trail limit:

instanceTrackingAuditTrailThreshold

You can modify it

in the System MBean Browser at the following location:

image

 

See also http://docs.oracle.com/cd/E25178_01/core.1111/e10108/others.htm Chapter “11.2.3 instanceTrackingAuditTrailThreshold” for details.

New BPEL Thread Pool in SOA 11g for Non-Blocking Invoke Activities from 11.1.1.6 (PS5)

Up to release 11.1.1.5 there have been 4 thread pools in Oracle SOA Suite 11g to control parallelism of execution:

  • Invoke Thread Pool (for asynchronous invocations)
  • Engine Thread Pool (i.e. for callback execution)
  • System Thread Pool
  • Audit Thread Pool

Starting with 11.1.1.6 there is one (still undocumented) new thread pool introduced for non-blocking invoke activities.

Here is a view of the System MBean Browser:

image

The MBean name is: 
oracle.dms:Location=soa_server1,name=/soainfra/engines/bpel/requests/non-block-invoke,type=soainfra_bpel_requests

You can change a synchronous invoke activity from a blocking call to non-blocking by using the partnerlink level property:

image

This thread pool is configured in SOA-Administration –> BPEL Service Engine Properties under “More BPEL Configuration Properties…” with the property DispatcherNonBlockInvokeThreads:

image

Be aware that the default is only 2 – so this can be a bottleneck in high load scenarios if not changed. Especially if you have multiple partnerlinks using non-blocking calls – because all of them share this thread pool…

Have fun, Stefan

A Universal JMX Client for Weblogic – Monitoring BPEL Thread Pools in SOA 11g

Monitoring and optimizing BPEL Thread Pool utilization (and other metrics) is one of the key activities in performance tuning of BPEL/SOA based integrations. Although EM console provides some basic monitoring of the BPEL engine statistics, it is limited regarding the update interval, detail and the recording interval and cannot display historic data. Of course you can setup Grid Control 11g with its Repository, but this is in most cases too complex to setup just for monitoring during performance and load testing.

So, the idea came to create a tool which can easily record these statistics and export them to MS Excel or OpenOffice to create charts for the thread pool utilization over a time period (for example a whole load test execution).

All values of WLS or the SOA engine can be queried using the JMX MBean framework. I have designed the JMXClient to be able configure which MBeans should be queried by using a property file (beans.properties). I decided to connect in this first release to only one Managed Server of WLS to record / export data. This means that if you have a WLS cluster, you need to start multiple JMX Clients to record the values of each node. (In a later release the JMX Client could be optimized to query all nodes automatically).

JMXClient can be used by downloading from the project page at Sourceforge.  (including JDeveloper 11.1.1.6 project and sources)

After that you need to configure

  1. your connection properties, JAVA_HOME and WLS_HOME of  your WLS managed server of SOA in  jmxclient.bat (or jmxclient.sh)
  2. the MBeans names, WLS Server name  and the attributes to record in classes/beans.properties  (you can find the MBean names form the System MBean Browser in EM)

The syntax in jmxclient.bat is

java -cp classes;%INCLUDE_LIBS% jmxclient.JMXClient <server> <user> <password> -monitor 1000

For example

java -cp classes;%INCLUDE_LIBS% jmxclient.JMXClient 192.168.56.101 7001 weblogic welcome1 -monitor 1000

“1000” specifies the interval in milliseconds between the recording.

Then you can run it with

jmxclient > out.txt

Then simple import this text file using Excel or OpenOffice and a comma “,” as delimiter and create a line chart using line 2 as titles and lines 3 to end as data.

Let me first show a couple of results using JMXClient using the properties to record the BPEL thread pool statistics:

The following chart shows a scenario where the invoke thread pool is much too low (20) so that the queue of scheduled invocations waiting for a free thread is growing rapidly:

image

The second example shows a scenario where invoke and callback threads are within normal limits:

image

In the next posts I will show how to use JMXClient to record the BPEL process execution times or the number of messages in the AIA 11g JMS queues by simply exchanging the beans.properties file…..!

Have fun,
Stefan

DISCLAIMER: JMXClient is provided for free use “as is” without any support or warranty. Please provide enhancements or modifications you make yourself. Feedback is welcome using the comments feature of this blog.

PS: for the experts: the format of the beans.properties file:

Every line contains 3 items separated by semicolon:

  1. the name of the MBean to query
  2. the attribute to query
  3. the title string which should be displayed for the column

Example for the bpel thread pools:

oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/invoke,type=soainfra_bpel_requests;active_maxValue;Invoke Active Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/invoke,type=soainfra_bpel_requests;scheduled_maxValue;Invoke Scheduled Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/invoke,type=soainfra_bpel_requests;scheduled_value;Invoke Scheduled Current
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/invoke,type=soainfra_bpel_requests;active_value;Invoke Active Value
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/invoke,type=soainfra_bpel_requests;threadCount_value;Invoke Threads Value
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/invoke,type=soainfra_bpel_requests;threadCount_maxValue;Invoke Threads Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/system,type=soainfra_bpel_requests;active_maxValue;System Active Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/system,type=soainfra_bpel_requests;scheduled_maxValue;System Scheduled Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/system,type=soainfra_bpel_requests;scheduled_value;System Scheduled Current
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/system,type=soainfra_bpel_requests;active_value;System Active value
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/system,type=soainfra_bpel_requests;threadCount_value;Invoke Threads Value
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/system,type=soainfra_bpel_requests;threadCount_maxValue;Invoke Threads Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/engine,type=soainfra_bpel_requests;active_maxValue;Engine Active Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/engine,type=soainfra_bpel_requests;scheduled_maxValue;Engine Scheduled Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/engine,type=soainfra_bpel_requests;scheduled_value;Engine Scheduled Current
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/engine,type=soainfra_bpel_requests;active_value;Engine Active value
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/engine,type=soainfra_bpel_requests;threadCount_value;Engine Threads Value
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/engine,type=soainfra_bpel_requests;threadCount_maxValue;Engine Threads Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/audit,type=soainfra_bpel_requests;active_maxValue;Audit Active Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/audit,type=soainfra_bpel_requests;scheduled_maxValue;Audit Scheduled Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/audit,type=soainfra_bpel_requests;scheduled_value;Audit Scheduled Max
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/audit,type=soainfra_bpel_requests;active_value;Audit Active value
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/audit,type=soainfra_bpel_requests;threadCount_value;Audit Threads Value
oracle.dms:Location=AdminServer,name=/soainfra/engines/bpel/requests/audit,type=soainfra_bpel_requests;threadCount_maxValue;Audit Threads Max