Some new features are added in fault policy in SOA 12c. Now you can send JMS, Email, and log alerts also using fault policy.
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.
7. Click OK.
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:
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
Post a Comment