Skip to main content

JMS alert using Fault Policy in SOA 12c

Some new features are added in fault policy in SOA 12c. Now you can send JMS, Email, and log alerts also using fault policy.

The scope of this blog is limited to JMS alert using fault policy.

Follow the below steps to send a JMS alert:

Prerequisite:
1. Create a JMS Queue/Topic in weblogic console.
2. Create a JMS connection Factory to send a message to JMS queue.

Steps:

1. Create a SOA composite "FaultPolicyTesting".
2. Right click on the project. Choose New -> From Gallery -> Choose Faults option under SOA Tier and select Fault Policy Document to create new fault policy file. Give an appropriate name.






















3. Open the fault policy document, go to design view. Choose fault name and corresponding action.









4. Go to Alert section and click on + button, choose JMS.












5. JMS properties window will pop up. Click on Create Required properties. Enter property name, JMS Destination (this should be your queue or topic JNDI name), and Connection Factory (this should be your JMS connection factory JNDI name.)

[Note: In the Connection Factory we need to enter the JMS connection factory JNDI name, not the outbound connection factory name].





















6. Click OK, and choose Property Set from the drop down. Add JMS headers as per below screen shot. You can add any JMS header of your choice.
[Note: Adding JMS header is compulsory.] 
























7. Click OK. 
8. Choose the alert from the drop down box in front of Default Action:














9. After doing the above configuration the policy should look like as below:












10. Open your composite and attach policy as per the below screen shot:





11. It will create a new file fault-binding.xml in the project folder.

In this way you can send a JMS alert using Fault policy.




Comments

Popular posts from this blog

Difference between OSB 11g And OSB 12c

In this blog I will walk  you  through from the new features of OSB 12c as well as the difference between OSB 11g and 12c. Following are the differences between OSB 11g and 12c : In the new version Oracle Service Bus (OSB) is renamed as Service Bus. Eclipse tool is needed to develop an interface in OSB 11g where as JDeveloper tool is needed to develop an interface in OSB 12c.  Oracle has integrated OSB 12c with JDeveloper. Now there is no need of Eclipse to develop an interface in 12c. Graphical representation of OSB components are similar to SOA BPEL components. Pipeline is separated from proxy service and it is separate component in 12c. To perform operations on database, ftp and files, it is no longer required to configure adapters in JDeveloper and copy it to Eclipse, because OSB 12c service is developed using JDeveloper only.

How to generate a unique id in XSLT

In this post I will explain you how to generate a unique Id in XSLT. To Generate a unique id in XSLT use oraext:generate-guid() function. See below screen shot to generate unique id in XSLT : Result of XSLT : The function oraext:generate-guid() has generated a unique Id as 2d333136303937343532313436323038. Similarly for each run this function will generate different unique Ids.

SOA 12c : How to read a file using File Adapter

In this post I will explain how to read, delete, and archive a file from any location. This post will also explain reading content of file in 12c and configuration of NXSD (Native Format Builder). This post can be applicable for SOA 11g also. File Adapter Configuration : Drag File Adapter to Exposed Services section : Enter file adapter JNDI Name File Adapter have multiple operations read, write, sync and chunked read operations. Here we are using read operation. Enter file source and archive location. If you don't want to archive any file, uncheck the Archive check box. Specify File name pattern to read files based on any pattern. Set Polling frequency. Polling frequency is the interval in which adapter will read the file from the particular location. Now we need to define an NXSD schema, to convert the file data to XML f...