Referencing a fault policy deployed to MDS

Rather than creating the fault-policies.xml and fault-binding.xml files in your composite project, which then get deployed with the composite into the runtime environment, you can actually reference the fault policies deployed to MDS.

Getting ready

Make sure you have created a file-based MDS repository for JDeveloper, as described at the start of this chapter, and that it contains valid fault-policies.xml and fault-binding.xml files.

Then, open the SOA project in which you want to reference the external fault policy.

How to do it...

  1. To reference the policies deployed on MDS, we need to add the properties oracle.composite.faultPolicyFile and oracle.composite.faultBindingFile to the composite.xml file.
  2. These should be added directly following the service elements and reference the location of your policy and binding files in MDS, as shown in the following code screenshot:
    How to do it...

How it works...

By default, at runtime the SOA infrastructure will look in the same directory, as composite.xml for the fault-policies.xml and fault-binding.xml files.

Specifying these properties overrides this default behavior, causing the SOA infrastructure to reference the specified location within MDS.

There's more...

This has a number of distinct advantages. Firstly, you can share fault policies across multiple composites. Secondly, if you need to modify your fault policies, you simply need to update a single copy of your fault policy and re-deploy it to MDS.

Note

When deploying an updated version of the fault policy, it will not be automatically picked up by any composite that uses it. Rather, you need to either re-deploy the composite or restart the server.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.237.164