cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject Re: Policies at the Bus level?
Date Mon, 17 Dec 2007 02:37:43 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yeah, I see how you can apply them to the &lt;bus&gt; theoretically.
The problem is the initialize(Bus) code looks like this:<br>
<br>
    public void initialize(Bus bus) {<br>
        <br>
        // this should never be null as features are initialised only<br>
        // after the bus and all its extensions have been created<br>
        <br>
        PolicyEngine pe = bus.getExtension(PolicyEngine.class);<br>
        <br>
        synchronized (pe) {<br>
            pe.setEnabled(true);<br>
            pe.setIgnoreUnknownAssertions(ignoreUnknownAssertions);<br>
            if (null != namespace) {<br>
                PolicyConstants pc =
bus.getExtension(PolicyConstants.class);<br>
                pc.setNamespace(namespace);<br>
            }<br>
            if (null != alternativeSelector) {<br>
                pe.setAlternativeSelector(alternativeSelector);<br>
            }<br>
        }<br>
<br>
Nowhere is it actually telling the policy engine about the policies
that are attached to the WSPolicyFeature. Hence putting a
&lt;Policy&gt; inside a &lt;bus&gt; doesn't really do anything.<br>
<br>
- Dan<br>
<br>
Glen Mazza wrote:
<blockquote cite="mid:1197849829.10099.3.camel@gmazza-desktop"
 type="cite">
  <pre wrap="">The cxf.xml file is for bus configuration.  Maybe [1] can give you an
idea how this is done.

HTH,
Glen

[1]
<a class="moz-txt-link-freetext" href="http://cwiki.apache.org/CXF20DOC/wsrmconfiguration.html#WSRMConfiguration-UsingtheReliableMessagingFeature">http://cwiki.apache.org/CXF20DOC/wsrmconfiguration.html#WSRMConfiguration-UsingtheReliableMessagingFeature</a>


Am Sonntag, den 16.12.2007, 18:25 -0500 schrieb Dan Diephouse:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I was trying to figure out how to apply a WS-Policy globally today
to 
the CXF Bus, but I'm not sure I really understand how to do it or if its 
possible. The WSPolicyFeature just seems to apply policies to 
Client/Servers.  initialize(Bus) seems to be written with the mistaken 
assumption that it is being called to initialize the WSPolicyFeature. 
But thats simply not the case - its being called to initialize global 
Bus level policies which apply to *everything*.

I'm happy to go about fixing this, but I can't seem to deduce how to use 
the PolicyEngine to enable a global policy. Any ideas?

- Dan

    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Dan Diephouse
MuleSource
<a class="moz-txt-link-freetext" href="http://mulesource.com">http://mulesource.com</a>
| <a class="moz-txt-link-freetext" href="http://netzooid.com/blog">http://netzooid.com/blog</a></pre>
</body>
</html>

Mime
View raw message