SOA Suite 12c: Multithreaded instance purging with the Java API by Maarten Smeets
May 29, 2015 Leave a comment
Let’s tackle a single topic at a time in this blog post SOA Suite 12c provides a Java API to perform operations on the SOA infrastructure and things running there such as composites and instances. There are several blog posts available on how to do this in SOA Suite 10g and 11g. However since 12c is relatively new, I decided to try if I could easily access the Java API in 12c and if the API was still similar to 11g or had undergone major changes. As a usecase I decided I wanted to purge instances. This is usually done by database scripts on the SOA infra database. If however you do not have direct access to the database, this can be used as an alternative. I could of course have done the same by using WLST. I found that purging instances by using the Java API was slow so I decided I would like to try this using multiple threads working in parallel. The resulting code is provided in this post.
Implementation
In order to separate the different topics which will be discussed in this blog post I split the implementation in three parts. JDeveloper 12c, Purging composites and Multithreading.
JDeveloper 12c. Using the SOA Suite Java API
In JDeveloper 11g I would have to add the required libraries in the project properties and I could create a Java class which could access the Java API. In JDeveloper 11g I would have to add the following library references: WebLogic 10.3 Remote-Client, SOA Runtime, JRF API. I decided to try the same in JDeveloper 12c. When adding the SOA Runtime however, JDeveloper 12c decided I would want to develop a composite and ‘refactored’ my project to allow development of composites. This wasn’t what I wanted however. In order to avoid this issue/feature I decided to add a single JAR to my 12c project containing required classes instead of using the SOA Runtime library reference. I added oracle.soa.wlstman.jar from my ORACLE_HOME/soa/soa/oracle.soa.fabric.11.1.1 folder (yes, the 11.1.1 folder is still there in 12.1.3). I of course also needed to add Weblogic 12.1 Remote-Client and JRF API to get it working. I have not tried manually editing the pom.xml to include the SOA Runtime dependency, so I can not say if this will avoid the project refactoring done by JDeveloper. Read the complete article here.
For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.
Blog
Twitter
LinkedIn
Facebook
Wiki
