I have the DS component straightened out now. I listen for CXF Bus
registrations and have a separate interface that can be used to add
BusConfiguration instances to the registry. Commonly I'm using the same
configuration object across multiple busses so it doesn't degrade into high
complexity unnecessarily but it is easy enough to create instances. 

Anything I'm missing here?

This isn't just about the difference in endpoints in production either, it's
about being able to easily switch the Bus from a development to production.
A lot of time when I'm working on new functionality and integration, I don't
want to be fooling with security or such issues but I do want to log
everything going in and out. In production it is usually a security
violation to be logging all incoming and outgoing data.

So I can have a mixin that logs everything. The Feature works fine for this
but it really isn't intended functionality. Now it is a component that lives
in its own bundle and the configuration info below will pull that interface
from the registry and add the configurators that way instead of directly
instantiating and exporting to the registry.

        <bean id="configFeatureListener"
class="foo.esb.cxf.bus.configuration.internal.BusConfiguratorFeature">
                <property name="configurators">
                                <map>
                                        <entry key="fooBus" 
value-ref="developmentBusConfiguration" />
                                        <entry key="barBus" 
value-ref="developmentBusConfiguration" />
                                        <entry key="bazBus" 
value-ref="standardProductionBusConfiguration" />

                                </map>
                        </property>
        </bean>


        <bean id="developmentBusConfiguration"
class=foo.esb.cxf.bus.configuration.internal.BusConfiguratorBean">
                <property name="mixins">
                        <list>
                                <ref component-id="commons" />
                                <ref component-id="debugLogging" />

                        </list>
                </property>
                
                <property name="properties">
                        <map>
                                <entry key="someKey" value="A property override 
in standard bus." />

                        </map>
                </prop

<!--Different blueprint file for just different logging setups -->

        <bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor" />
        <bean id="logOutbound"
class="org.apache.cxf.interceptor.LoggingOutInterceptor" />

        <bean id="debugLogging"
class="gov.texas.trs.esb.cxf.bus.configuration.internal.BusConfigurationMixin">

                <property name="inInterceptors">
                        <list>
                                <ref component-id="logInbound" />
                        </list>
                </property>
                <property name="outInterceptors">
                        <list>
                                <ref component-id="logOutbound" />
                        </list>
                </property>

        </bean>



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Reply via email to