Java Reference
In-Depth Information
This class features the @Policy annotation and points to the DefaultReliability.xmlfile, which
is one of the two that ships with WebLogic (the other value you could put there is “LongRun-
ningReliability.xml”). If you just wanted to write the policy section, you could do that and
substitute the value of the uri attribute with the name of your file.
NOTE
The file does not have to be relative within the deployment; it can be specified from an absolute URI,
like this: @Policy(uri="http://soacookbook.com/policies/myPolicy.xml" .
The @ReliabilityBuffer annotation indicates that the runtime should try to deliver reliable
messages to the service a maximum of 10 times, at 5-second intervals.
There are two RM policies included with WebLogic 10. The default file has the following
contents:
<?xml version="1.0"?>
<wsp:Policy
xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:beapolicy="http://www.bea.com/wsrm/policy">
<wsrm:RMAssertion >
<wsrm:InactivityTimeout
Milliseconds="600000" />
<wsrm:BaseRetransmissionInterval
Milliseconds="3000" />
<wsrm:ExponentialBackoff />
<wsrm:AcknowledgementInterval
Milliseconds="200" />
<beapolicy:Expires Expires="P1D" optional="true"/>
</wsrm:RMAssertion>
</wsp:Policy>
This is much easier to write than a whole WSDL, and it's far more modular. Defining policies
in this form allows you to reuse policies across multiple services, and to store them in a central
repository. This is just the sort of scenario that makes SOA, and the WS-* set of specifica-
tions, so compelling.
But as with so many things, using this method of offering support for RM trades convenience
for portability. Notice that in the pre-prepared policy file you get a BEA namespace and an
assertion that is vendor-specific. This is in addition to the proprietary annotation used to asso-
Search WWH ::




Custom Search