Recent Blog Entries

Friday, 2 November 2012

New whitepaper “SOA 11g - The Influence of the Audit Level on Performance and Data Growth”

I have created a new whitepaper comparing the effect of different Audit Level settings in SOA/AIA 11g:

SOA 11g - The Influence of the Audit Level on Performance and Data Growth - A comparison using AIA 11.1 and 11.2 COMMS Order-to-Bill PIPs.

Please download from here.

Monday, 20 August 2012

AIA/SOA Trips & Tricks (4) : 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.

Friday, 17 August 2012

AIA/SOA Trips & Tricks (3) : How to Save BPEL 10g Statistics Programmatically in a File

In Oracle BPEL Process Manager, statistics about the average execution times of BPEL processes can be displayed on the BPEL Console:

image

It is very important to monitor these values to be able to react on abnormal high execution times – especially for sync processes – to prevent from JTA transaction timeouts, for example.

While this is possible with EM Grid Control and SOA Management Pack, there is no out of the box solution without EM GC  for saving these statistics periodically to a file.

For this purpose, I have written two Java classes – one for retrieving the statistics via the BPEL API and one for resetting the statistics values.

The first makes use of of the following API calls

Statistics[] asyncStats = domain.getAsyncStatistics();
System.out.println("===> Async BPEL Domain Statistics:");
for (int i=0;i<asyncStats.length;i++)
    System.out.println(asyncStats[i]);

Statistics[] syncStats = domain.getSyncStatistics();
System.out.println("===> Sync BPEL Domain Statistics:");
for (int i=0;i<syncStats.length;i++)               
    System.out.println(syncStats[i]);

Statistics[] requestStats = domain.getRequestStatistics();
System.out.println("===> BPEL Engine Requests Statistics:");
for (int i=0;i<requestStats.length;i++)
    System.out.println(requestStats[i]);

The JDeveloper project with both classes can be downloaded from here.

To adapt it to your environment, you need to change the connection URL and credentials in file classes/context.properties. Also you need to have the OC4J libraries listed in getBPELStats.sh in a local directory (copy these from the server).

Sample output:  (format is:  minimum < “Process Name”  ~ average  < maximum time is milliseconds)

GetBPELStats for SOA10g
Date: 17.08.2012 11:41:41:336
===> Successfully connected to domain default
===> Async BPEL Domain Statistics:
3158 < OrderEnqueue 1.0 ~ 3158.0 < 3158 based on 1 stats
===> Sync BPEL Domain Statistics:
781 < SyncCustomerPartyListBRMCommsProvABCSImpl 1.0 ~ 972.9 < 1261 based on 10 stats
18468 < CommsProcessFulfillmentOrderBillingAccountListEBF 1.0 ~ 18995.5 < 19315 based on 10 stats
14181 < CommsProcessBillingAccountListEBF 1.0 ~ 14589.9 < 14881 based on 10 stats
1461 < QueryCustomerPartyListSiebelProvABCSImplV2 1.0 ~ 1908.2 < 2605 based on 10 stats
1346 < ProcessFulfillmentOrderBillingResponseOSMCFSCommsJMSProducer 1.0 ~ 1504.3 < 1792 based on 10 stats
7255 < ProcessSalesOrderFulfillmentSiebelCommsReqABCSImpl 1.0 ~ 7543.5 < 7704 based on 10 stats
5 < AIASessionPoolManager 1.0 ~ 716.3 < 2162 based on 20 stats
18692 < ProcessFulfillmentOrderBillingBRMCommsProvABCSImpl 1.0 ~ 21442.1 < 22780 based on 10 stats
108791 < TestOrderOrchestrationEBF 1.0 ~ 109057.7 < 109601 based on 10 stats
17035 < UpdateSalesOrderSiebelCommsProvABCSImpl 1.0 ~ 18881.2 < 20064 based on 10 stats
3403 < ProcessFulfillmentOrderBillingBRMCommsAddSubProcess 1.0 ~ 3973.8 < 4550 based on 10 stats
1816 < ProcessSalesOrderFulfillmentOSMCFSCommsJMSProducer 1.0 ~ 2263.8 < 2448 based on 10 stats
2426 < ProcessFOBillingAccountListRespOSMCFSCommsJMSProducer 1.0 ~ 2784.2 < 3002 based on 10 stats
===> BPEL Engine Requests Statistics:
0 < eng-composite-request.eng-single-request.handle-workitem.do-perform.actual-perform.InvokePCM_OP_CUST_COMMIT_CUSTOMER.sensor-send-activity-data ~ 0.0 < 0 based on 20 stats
8 < eng-composite-request.eng-single-request.handle-workitem.do-perform.actual-perform.Invoke_UpdateSO.invoke-service.invoke.actual-invoke.wsif-invoke.wsif-remote-call.prepare-call.populate-message.deep-copy ~ 14.2 < 20 based on 10 stats
0 < eng-composite-request.glue-requests-store.cube-instance-save-datastore.ci-store.at-store.at-db-insert.to-byte-array ~ 0.05 < 2 based on 71 stats
0 < eng-composite-request.eng-single-request.handle-workitem.do-perform.actual-perform.TwoPhaseMode_to_Three.sensor-send-variable-data ~ 0.0 < 0 based on 10 stats
1 < eng-composite-request.eng-single-request.load-instance-for-workitem.load-instance.actual-instance-load.cube-instance-load-datastore.ci-load.ci-load-instance ~ 4.2 < 71 based on 40 stats
4 < eng-composite-request.eng-single-request.handle-workitem.do-perform.actual-perform.ds-subscribe ~ 12.17 < 44 based on 40 stats

Tuesday, 7 August 2012

AIA Tips & Tricks Series (2): Preventing from Exceptions with Very Large Audit Trails in AIA/SOA 11g

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.

Thursday, 26 July 2012

AIA Tips & Tricks Series: Purging ESB Resequencer Tables in AIA 2.5 (Example: Comms PIPs)

AIA 2.5 Comms PIPs use the ESB 10g Resequencer for the following ESB Services:

  • CommunicationsCustomerPartyEBSV2Resequencer
  • SyncAcctSiebelAggrEventConsumer_RS
  • ProcessSalesOrderFulfillmentSiebelCommsSequencer
  • Consume_UPDSO_RS

While processing extensive volumes, the number of rows can grow quite rapidly in the ESB Resequencer tables (ESB_MESSAGES, ESB_MESSAGE_MAP, ESB_GROUP_STATUS). It is therefore critical to include these tables in the regular purging procedure – the standard ESB purge scripts will not touch them.

For ESB 10.1.3.5.2, the ESB Resequencer Purge Script is made available though Patch 9309170 – “Purge script for ESB scripts resequencer table”.
It adds a file  purge_resequencer_by_timestamp_serviceGUID.sql in SOA_HOME>/integration/esb/sql/other
Running this in sqlplus on schema ORAESB creates a stored procedure

res_purge_by_date_sguid(date d, varchar guid)

For purging all services using resequencer older than 10 days you can execute for example:

DECLARE
   CURSOR reseq_services is
   select guid from wf_events where name in ('CommunicationsCustomerPartyEBSV2Resequencer', 'SyncAcctSiebelAggrEventConsumer_RS', 'ProcessSalesOrderFulfillmentSiebelCommsSequencer', 'Consume_UPDSO_RS');

BEGIN
   FOR service IN reseq_services LOOP
        res_purge_by_date_sguid(sysdate-10, service.guid);
END LOOP;
END;
/

If you want to determine all ESB services which use Resequencer dynamically you can use

SELECT GUID from WF_EVENTS where ENDPOINT_PROPERTIES like '%ResequencerType%'

So the sequence for purging all AIA data is:

  1. Purge Resequencer data with  res_purge_by_date_sguid  (Example above)
  2. Purge ESB runtime data with purge_by_date_package.Purge_by_Date(date d)
    Example: CALL purge_by_date_package.Purge_by_Date(sysdate – 10)
  3. Purge BPEL runtime data
    Example: CALL SINGLE_THREADED_LOOPED_PURGE.purge_instances_loop(date d, integer rows, integer seconds);
  4. Check ESB queue tables
  5. Check AIA PIP Queue Tables (in JMSUSER)

Additional resources:

A useful query of the number of messages in ESB_GROUP_STATUS to check the purge is

select error, count(1), name from esb_group_status e, wf_events w where e.service_guid = w.guid  group by error, name;

0    126   Consume_UPDSO_RS
1    53    ProcessSalesOrderFulfillmentSiebelCommsSequencer
0    136   CommunicationsCustomerPartyEBSV2Resequencer
1    1     CommunicationsCustomerPartyEBSV2Resequencer
0    219   ProcessSalesOrderFulfillmentSiebelCommsSequencer
1    1     Consume_UPDSO_RS

Useful script for checking all BPEL and ESB tables:

select 'attachment', count(1) from orabpel.attachment UNION
select 'audit_details', count(1) from orabpel.audit_details UNION
select 'audit_trail', count(1) from orabpel.audit_trail UNION
select 'cube_instance', count(1) from orabpel.cube_instance UNION
select 'cube_scope', count(1) from orabpel.cube_scope UNION
select 'dlv_message', count(1) from orabpel.dlv_message UNION
select 'dlv_subscription', count(1) from orabpel.dlv_subscription UNION
select 'invoke_message', count(1) from orabpel.invoke_message UNION
select 'native_correlation', count(1) from orabpel.native_correlation UNION
select 'work_item', count(1) from orabpel.work_item UNION
select 'xml_document', count(1) from ORABPEL.xml_document UNION
select 'esb_control', count(1) from ORAESB.esb_control UNION
select 'esb_error', count(1) from ORAESB.esb_error UNION
select 'esb_error_retry', count(1) from ORAESB.esb_error_retry UNION
select 'esb_faulted_instance', count(1) from ORAESB.esb_faulted_instance UNION
select 'esb_group_status', count(1) from ORAESB.esb_group_status UNION
select 'esb_java_deferred', count(1) from ORAESB.esb_java_deferred UNION
select 'esb_messages', count(1) from ORAESB.esb_messages UNION
select 'esb_message_map', count(1) from ORAESB.esb_message_map UNION
select 'esb_monitor', count(1) from ORAESB.esb_monitor UNION
select 'esb_relation_xml', count(1) from ORAESB.esb_relation_xml UNION
select 'esb_relation_xml', count(1) from ORAESB.esb_relation_xml UNION
select 'esb_transaction_status', count(1) from ORAESB.esb_transaction_status;

Purging ESB Queue Tables (example for ESB_MONITOR and ESB_CONTROL):

declare
po dbms_aqadm.aq$_purge_options_t;
BEGIN
po.block := FALSE;
DBMS_AQADM.PURGE_QUEUE_TABLE(queue_table => 'ESB_MONITOR', purge_condition => NULL, purge_options => po);
END;
/

declare
po dbms_aqadm.aq$_purge_options_t;
BEGIN
po.block := FALSE;
DBMS_AQADM.PURGE_QUEUE_TABLE(queue_table => 'ESB_CONTROL', purge_condition => NULL, purge_options => po);
END;
/

References:

  • New BPEL 10g Purge Scripts From 10.1.3.5 MLR#2 [ID 1110833.1]
  • ESB Purge Instances scripts in 10.1.3.4 and 10.1.3.5 [ID 788285.1]

Tuesday, 10 July 2012

Verifying connectivity from Siebel EAI JMS to AIA 2.5 / OC4J 10.1.3 using a generic JMS Test Client

The integration of Siebel, BRM and OSM using AIA 2.5 makes use of the JMS client built in Siebel EAI. To verify if you have connectivity and the correct parameters on Siebel side, there is a very helpful JMS Test Client available in My Oracle Support – see MOS Note “Basic Troubleshooting Steps for EAI JMS Transport [ID 850954.1]”.

However this note is very generic. For being able to instantly run this in an AIA 2.5 environment I am including this TestJMSClient here as a JDeveloper 10.1.3.5 project. It is tested using JDBC 11.2.0.3 and OC4J 10.1.3.5.2.

Setting up and running the project is very easy: just copy the libraries needed from a SOA 10.1.3.5.2 installation  to a directory where the client runs. See here for a screenshot of the required libs:

clip_image002

Then adapt the jndi properties used in the class to your environment and run TestJMSClient.java.
The standard behaviour of the TestJMSClient is to send a new JMS TextMessage every 5 seconds (100 in total).

A successful execution should produce this output:

Lookup Queue Connection Factory : java:comp/resource/COMMS_SUBMITORDER_PRODUCER/XAQueueConnectionFactories/AIA_Queue
OK
Lookup Queue java:comp/resource/COMMS_SUBMITORDER_PRODUCER/Queues/AIA_SALESORDERJMSQUEUE
OK
Creating Queue Connection...
OK
Creating Queue Session...
OK
Creating Sender...
OK
Creating Text Message...
OK
Sending message...
OK
Sent message: Testing: Tue Jul 10 16:21:02 CEST 2012 - ID:C47B70A81A140F5AE0436538A8C0198C

You might run into several connectivity issues:

Issue 1:

oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
WARNING: Exception returned by remote server: {0}
java.lang.NoClassDefFoundError: oracle/classloader/PolicyClassLoader

Solution: include pcl.jar in the list of project libraries

Issue 2:

Creating Queue Connection...
Exception occurred: oracle.jms.AQjmsException: IO Error: The Network Adapter could not establish the connection

Solution:  One possible cuase may be that the host name of the database is not known on client side (missing entry in file /etc/hosts or \Windows\system32\drivers\etc\hosts)

Issue 3:

Creating Queue Connection...
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/bcel/generic/Instruction

Solution:  bcel.jar is missing in the list of project libraries

Issue 4:

oracle.j2ee.clustering.ClusteringMessages warningInOpmnGetServers
WARNING: Error in obtaining server list from OPMN on host node1.aiaperf.com:6003. Please verify that OPMN is running.
Lookup Queue Connection Factory : java:comp/resource/COMMS_SUBMITORDER_PRODUCER/XAQueueConnectionFactories/AIA_Queue
JNDI lookup failed: javax.naming.NameNotFoundException: java:comp/resource/COMMS_SUBMITORDER_PRODUCER/XAQueueConnectionFactories/AIA_Queue not found

Solution:  OC4J is not running or the Connection Factory JNDI name is wrong

Issue 5:

If you receive class version / serial id mismatch exceptions, this is likely a difference in the classes used in the aqapi.jar on client and on OC4J server side.

Solution:  Be sure that you are using the same aqapi.jar and ojdbc5.jar on client side and server side.

More on adopting the JMS Test Client for AIA 11.x soon!

Wednesday, 4 July 2012

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

Tuesday, 26 June 2012

A Universal JMX Client for Weblogic –Part 1: 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

Friday, 25 May 2012

Tracking the cluster node of BPEL instance invocations in SOA / AIA 10g

In a BPEL 10g cluster you often have the situation that incoming messages are picked up by adapters (i.e. JMSAdapter) on all nodes in parallel. Verifying if all nodes pickup these messages evenly is not easy in 10g because the processing cluster node is not saved in the DB schema. You can scan the log files (assuming you have the right log level) but there is a more elegant way:

1. Include in the BPEL processes at the beginning of a flow/transaction  (like ProcessSalesOrderFulfillmentSiebelCommsReqABCSImpl in AIA Comms PIPs) or in a Provider ABCS you want to track the following code snippet at the beginning (after the initial receive activity):

<bpelx:exec name="Java_Embedding_1" language="java" version="1.5">
      <![CDATA[try {      
    java.net.InetAddress addr = java.net.InetAddress.getLocalHost();      

    // Get IP Address (only if needed)
    // byte[] ipAddr = addr.getAddress();      

    // Get hostname      
    String hostname = addr.getHostName();  

    setIndex(1,hostname); 
} catch (Exception e) {      
}]]>

</bpelx:exec>

      This will save the hostname of the machine where the instance was executed to the custom index field 1 in the bpel instance.
2. This index field can then be displayed in the BPEL Console

bpel

3. This value can also be queried using a SQL statement on schema ORABPEL , joining CUBE_INSTANCE and CI_INDEXES based on CIKEY, showing the count of all executions per node:

select count(1), index_1 from CI_INDEXES, CUBE_INSTANCE where CI_INDEXES.CIKEY = CUBE_INSTANCE.CIKEY group by index_1;

With this you can verify if the bpel invocations in the cluster are processed evenly.
This approach should have almost no performance impact (can be permanent) and enable tracking of the distribution of the instance invocations in 10g.

In SOA 11g this is not needed anymore because CREATE_CLUSTER_NODE_ID and LAST_CLUSTER_NODE_ID are already part of CUBE_INSTANCE.

Thursday, 10 May 2012

Setting up the AQ Connection from Oracle BRM to AIA 11.2 in the Order to Cash and AABC PIPs

When you install the AIA 11.2 “Comms Order to Cash: SBL CRM and BRM Pre-Built Integration” you will be asked for the BRM Connection Details:

I used the following settings for my environment:

clip_image002

After successful Deployment I got the following errors at startup of soa_server1:

AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
The Resource Adapter AQ Adapter was unable to activate the endpoint oracle.tip.adapter.aq.inbound.AQDequeueActivationSpec:{Correlation=DiscountInfoChange, QueueName=BRMQUEUE, DatabaseSchema=brm, SchemaValidation=false} due to the following reason: BINDING.JCA-11975
AQ_INVALID_QUEUE.
Unable to obtain queue table name.
Queue does not exist or not defined correctly.
Drop and re-create queue.

and

AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
The Resource Adapter AQ Adapter was unable to activate the endpoint oracle.tip.adapter.aq.inbound.AQDequeueActivationSpec:{Correlation=ProductInfoChange, QueueName=BRMQUEUE, DatabaseSchema=brm, SchemaValidation=false} due to the following reason: BINDING.JCA-11975
AQ_INVALID_QUEUE.
Unable to obtain queue table name.
Queue does not exist or not defined correctly.
Drop and re-create queue.

Cause:

I missed the small note in the 11.2 PIP installation guide saying

Oracle AQ Username: ….Note: This value must be in uppercase (PIN7820) for the OOTB PLM flow to work.

This issue is described in Oracle Support Note ID 1436317.1 : Unable to dequeue data from BRM Queue in O2C Integration

Solution:

Undeploying, reconfiguring  and reinstalling the PIP as mentioned in the note is not necessary. You can correct the invalid lowercase AQ Schema name by modifying the following 2 files:

  • <AIAHome>/services/industry/Communications/BRM/AdapterServices/SyncDiscountInfoChangeBRMAQ/SyncDiscountInfoChangeBRMAQ_aq.jca
  • <AIAHome>/services/industry/Communications/BRM/AdapterServices/SyncProductInfoChangeBRMAQ/SyncProductInfoChangeBRMAQ_aq.jca

Change this to include the uppercase schema name and redeploy both 2 processes:

<property name="DatabaseSchema" value="BRM"/>

Alternatively you can change the value in EM Console:

image

See http://docs.oracle.com/cd/E26778_01/doc.112/e26495/commsordertobill.htm

PS: If you don’t have a fully functional Oracle BRM installation, it is sufficient for the PIP installation to create the BRM schema and the AQ queue:

BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE
(Queue_table => 'brm.brm_qtt',
Queue_payload_type =>
'SYS.AQ$_JMS_TEXT_MESSAGE', compatible =>
'10.0.0');
END;


BEGIN DBMS_AQADM.CREATE_QUEUE (Queue_name
=> 'brm.brmqueue',
Queue_table =>
'brm.brm_qtt');
END;

BEGIN
DBMS_AQADM.START_QUEUE (Queue_name =>
'brm.brmqueue');
END;