Category Archives: Service Bus

SOA Suite 11gR1 PS2 released

Previous I mentioned a preview of the 11g R1 PS2 new features. Here are a few links for this new release – 11.1.1.3.0:

Existing PS1 users simply apply the patch to upgrade to 11.1.1.3.0.

Other releases

Running SOA Suite on Amazon EC2

SOA Suite on EC2

SOA Suite on EC2


One of the things on my To Do list was to move my local SOA Suite 11g R1 to The Cloud. It seemed a good idea to save my laptop some resources (to spare some for JDeveloper) with only a limited investment. Besides that it can be a good way to demo applications, and work together with my colleagues on these demos.

During the last months I noticed that there are several good blogpost on the subject. In this post I’ll show you the ones I used and provide some additions to them.

Setting up Amazon Web Services (EC2 and S3)

This arcticle on OTN guided me while signing up for:

  • Amazon AWS
  • Amazon S3 – Simple Storage Service
  • Amazon EC2 – Elastic Compute Cloud

and to setup PuTTY. The only hick-up here was that I’m using the PortableApps version of PuTTY that doesn’t come with the puttygen – Key Generator.

Provisioning a SOA Server on Amazon EC2

This blogpost guided me in the provisioning of the AMI (Amazon Machine Image).

  • AMIs are per region: The Amazon Machine Instance (AMI) for SOA Suite (id = ami-acb557c5) is only available in the US East (Northern Virginia) Region.
  • Don’t bother to setup the Elastic Block Store (EBS) Volume. It is scripted in the latest version of the AMI, as described in step 5 of “SSH to your image and accept license”. The EBS Volume is seeded using a snapshot (id = snap-dd980db4) that is provided. This volume will be used to persist your data across sessions and AMI start/stop.
  • When launching the image (during the Configure Firewall step) set the SecurityGroup to accept HTTP traffic on port 7001 in case you want to use the SOA Suite from outside the Image.

Upcoming SOA Suite 11g PS2 features

Yesterday Clemens Utschig posted a list of SOA Suite 11gR1 Patchset 2 ~ 11.1.1.3.0 (SOA) features. He says it is a non-exhaustive list. It contains features like:

  • Full and complete support for BPEL 2.0 (designtime and runtime)
  • Reintroduction of “BPEL domains” – that are called Partitions because there are already WebLogic Domains
  • Enhancements to BPEL’s transactional behavior and audit-trail
  • Full BPMN 2.0 support – part of BPM 11g which runs on top of 11g PS2 SOA core

Update: for the Java developer

In an additional post the features for the Java developer were announced. These include:

  • Support for interface.java as a first class citizen next to interface.wsdl
  • Full support for Spring as component implementation
  • Support for EJB bindings (binding.ejb)
  • Invocation of a composite service

Oracle Sun – SOA and Integration strategy outline

The webcast of the SOA and Integration strategy was a few days later available as the overall strategy. You can find the entire webcast here.

SOA Platform

The combined Oracle Sun solution focus boils down to the following bullets:

  • Oracle SOA Suite continues as the strategic product.
  • Sun JCAPS continues to be supported and maintained
  • GlassFish ESB continues as an open source project
  • A bridging technology is planned to support collaboration between JCAPS and Oracle SOA Suite.
  • Key functions from the Sun SOA products will be incorporated in the Oracle SOA products.

Portal technologies

Oracle WebCenter stays the strategic portal offering. Support for both GlassFish Web Space Server and Sun Portal Server will be continued. An upgrade path to WebCenter is planned for both. The IP (Intellectual Property) for Sun’s Web Space Server will be released into the Liferay open source community.

Monitoring AQ

Although there were already several posts on querying AQ, like “in the queue” and “enqueue“, the next one is great when monitoring AQ. We are using this to monitor AQ, especially for Oracle ESB (hence the commented addition):

1
2
3
4
5
6
7
8
9
SELECT aq.name
,      aq.queue_table
,      aq.queue_type
,      v$aq.* 
FROM   v$aq
,      all_queues aq
WHERE  aq.qid = v$aq.qid
-- use if looking for ESB AQ: and    aq.queue_table = 'ESB_JAVA_DEFERRED';
;

The query will result in something like:

Monitoring AQ query results

It contains the following metrics:

  • Waiting – Number of waiting message;
  • Ready – Number of messages with status ready;
  • Expired – Number of expired messages;
  • Total Wait – Total waiting time per queue;
  • Average Wait – Average waiting time per queue.

A describtion of the AQ and Streams views can be found here.

Tuning AQ for Oracle ESB

If you are using AQ within Oracle ESB there might be a point in time you want to tune AQ performance. In this post you’ll find the results of Metalink research, and our experience on a production system.

Queue compatibility

When creating the ORAESB schema (in version 10.1.3.3) using the script $ORACLE_HOME/integration/esb/sql/oracle/create_esb_topics.sql, the queues are created with 8.1 compatibility. This is solved in 10.1.3.4. To alter this find the statement

1
2
3
4
5
6
dbms_aqadm.create_queue_table
    ( Queue_table => qtablename
    , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
    , multiple_consumers => TRUE
    , compatible => '8.1'
    );

and change this to:

1
2
3
4
5
6
dbms_aqadm.create_queue_table
    ( Queue_table => qtablename
    , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
    , multiple_consumers => TRUE
    , compatible => '10.2'
    );

if you already created the queues, use this statement:

1
2
3
4
dbms_aqadm.migrate_queue_table
    ( queue_table => 'ESB_JAVA_DEFERRED'
    , compatible => '10.2'
    );

If you’re not sure check the compatibility with this query:

1
2
3
4
5
6
SELECT queue_table
,      compatible
,      recipients
FROM   dba_QUEUE_tables
WHERE  owner = 'ORAESB'
;

Streams pool size

Verify the current stream_pool_size using the following query:

1
2
3
4
5
6
7
SELECT component
,      current_size/1024/1024 "CURRENT_SIZE"
,      min_size/1024/1024 "MIN_SIZE"
,      user_specified_size/1024/1024 "USER_SPECIFIED_SIZE"
,      last_oper_type "TYPE" 
FROM   v$sga_dynamic_components
;

look for the streams pool. There are several Metalink notes on this setting (including 316889.1, 102926.1 and 335516.1). The latter has a general recommandetion per RDBMS version:

  • 11g: set STREAMS_POOL_SIZE to be greater or equal to 100 MB;
  • 10gR2: set SGA_TARGET > 0 and STREAMS_POOL_SIZE=0 to enable autotuning of the Streams pool;
  • 10gR1: use the STREAMS_POOL_SIZE init.ora parameter to configure the Streams memory allocation;

And of course you could use V$STREAMS_POOL_ADVICE to get advice for your specific situation.

Upgrade the JDK

A described here upgrading the JDK can also give a performance boost.

Oracle ESB using AQ on AIX – performance boost

One of the projects I’m involved in, uses Oracle ESB (from SOA Suite 10.1.3.3 MLR 18) running on AIX 5.3. Instead of using the default in-memory JMS the ESB is configured to use Oracle Advanced Queueing (AQ). Although there were tuning efforts before, the performance wasn’t up to par. AQ seemed to be the bottleneck, especially the dequeueing part. During the day we saw the number of messages queue up. Generally these numbers would decrease after business hours. This should have been a big problem if the number of messages wasn’t going to be tripled or quadrupled in the next month(s).

Upgrade the JVM

Previous attempts in cooperation with Oracle Consulting hadn’t done the trick, yet. To get a fresh view and some out-of-the-box thinking Marc joined the team. He performed a scan of the systems settings. Researching Oracle’s knowledge system resulted (searching on AIX & ESB & DB Adapter) in the clue to upgrade the JVM (6848406 – SLOW PERFORMANCE ON AIX ESB USING FILE AND DB ADAPTER). Although we were skeptic at first, because why tried a similar path before, we decided to give it a shot. The previous attempt resulted in errors in our code without enhancing the performance of the system.
With the AIX system a Java 5 is delivered in /usr/java5, to be more precise:

1
2
3
4
5
6
7
8
$:/jdk/bin>./java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pap32dev-20080315 (SR7))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc-32 j9vmap3223-20080315 (JIT enabled)
J9VM - 20080314_17962_bHdSMr
JIT  - 20080130_0718ifx2_r8
GC   - 200802_08)
JCL  - 20080314

To change this stop the SOA Suite and:

1
2
3
cd $ORACLE_HOME
mv jdk jdk.orginal           # rename jdk directory
ln –s /usr/java5 jdk         # Creates symbolic link

and the start the SOA Suite. With this newer Java version we had a significant performance improvement.

Remaining issue

If the change is performed as described above Enterprise Manager doesn’t allow you to browse the oc4j_soa anymore. This will result in the following error message:

Unable to make a connection to OC4J instance oc4j_soa on Application Server someserver.local. A common cause for this failure is an authentication error. The administrator password for each OC4J instance in the Cluster must be the same as the administrator password for the OC4J instance on which Application Server Control is running.

This can be solved by applying the patch for base bug 5261515. The patch adds some security jars and properties that are not in the AIX Java5 version.
Since this patch introduces issues in our code, we are working around the Em problems for now, while trying to resolve the issue.

Book – Getting Started with SOA Suite 11gR1

SOA Suite 11g

SOA Suite 11g

As I recently blogged the book Getting Started With Oracle SOA Suite 11g R1 – A Hands-On Tutorial has my interest. Last week my copy arrived.

In a blogpost Clemens Utschig writes about this book:

Heidi and her team have done a tremendous job to structure the labs and hands-on exercises in a didactic, explanatory way – with solutions all the way through. This way the book serves not just as a tutorial, but also as a reference bible when it comes to implementation of specific features and concepts.

Being familiar with the labs and hands-on for the SOA Suite from the earlier versions up to 11g R1, and having read the first four chapters, I agree with Clemens. It is a good tutorial, and learning path that includes some great tips on how to overcome the pitfalls you could run into.

SOA Suite 11gR1 Book resources

To get an impression of the book you can download a sample chapter here (pdf). There aren’t any errata (yet).

Artifacts for the tutorial part are available for download. An overview of the required software can be found on the Release Downloads for Oracle SOA Suite pages of OTN. These include the link for download.

Oracle ESB performance enhancements

Because the growth in the number of messages that one of our customers is receiving on it’s Oracle ESB, they were looking into how to enhance it’s performance. Oracle came up with the following clues:

  • Upgrade SOA Suite to a higher patch level
  • Reduce logging (including instance tracking in ESB)
  • Increase the number of listeners in ESB on Queues
  • Turn off payload validation

In order to see what these could do for them we did some loadtesting. The upgrade to a higher patch level of SOA Suite was needed at least to get the ESB working correctly with the configured number of listeners. However because of some issues running Oracle Universal Installer there wasn’t any time left to verify that the patch resulted in increased performance.
For functional and application management reasons turning of logging was not considered an option at this stage.

Increase the number of listeners in ESB on Queues

set ESB listeners in console

set ESB listeners in console

For each ESB System the number of listeners can be configured. These listeners are used to read from JMS topics. If there is only one listener (which is the default) message are read from the JMS Topic one at a time. The first screenshot shows where to set the number of listereners using the ESB Console.

Average response time

Average response time


To determine the optimum number of listeners for the specific ESB, OS, hardware combination we did some loadtesting. The results for the average response time are shown in the next screenshot.

As expected the respons time increases at a certain point when the number of listeners is raised.

With 90% and max response time

With 90% and max response time

“Time out” messages are never created by averages. While this first graph looks great and is very convincing, we are even more interested in the 90% and maximum respons times. A chart for these statistics has been included as well. Analyzing this graph one can conclude that this has an even stronger support to set the number of listeners to an appropriate level.

From this experiments it can be concluded that the response time can significantly be reduced by setting the number of listeners of an ESB system to the appropriate level. The maximum respons time has can be decreased by over 50%. This has a significant impact on the availability of the services exposed using the ESB.

Turn off payload validation

Turn off payload validation

Turn off payload validation


Another idea to enhance the performance is to turn off payload validation. Needless to say that this also has functional aspect. In most cases the validation that is performed here has some kind of business (related goal), like data quality. To switch it off, has impact, and the validation has te be migrated to some place else in the software.
Response time

Response time


The performance results can be dramatic. In a positive way! As is shown in the figure on the right, the respons time can be reduced to a fifth of the original. This goes for both the average and the maximum respons times.

If you can change your service so payload validation at this point is no longer required, this is a great step in enhancing the Oracle ESB’s performance.

What is in the (Oracle Advanced) queue? – Monitoring AQ

As a quick follow up on the previous post… If you are using a JMS queue with Oracle´s Advanced Queueing or Streams (as they have been extended to) the previously described tool can´t help you out. You need something else for monitoring AQ.

For this case a blog by a former colleague helps us out. This approach to monitoring AQ boils down to…

Find the queue you want to monitor AQ.

1
2
3
4
5
SELECT owner
,      queue_table
,      TYPE
,      user_comment
FROM   all_queue_tables

Perform a query.

1
2
3
4
5
6
SELECT msgid
,      enq_time
,      enq_uid
,      qt.user_data.text_vc
FROM   my_queue_table qt  --alter the table name
WHERE  q_name = 'MY_QUEUE' --alter the queue name