I have the following module, and I would like to add a logging
interceptor to the Divider service, and only the Divider service.
How do I do this?

<module id="hivemind.examples" version="1.0.0">
    <service id="Calculator" interface="hivemind.examples.Calculator">
        <invoke-factory service-id="hivemind.BuilderFactory">
            <construct class="hivemind.examples.impl.CalculatorImpl">

                <set-service property="adder"
                             service-id="org.puppies.math.Adder"/>

                <set-service property="subtracter"
                             service-id="org.kitties.math.Subtracter"/>

                <set-service property="multiplier"
                             service-id="org.gerbils.math.Multiplier"/>

                <set-service property="divider"
                             service-id="org.fishies.math.Divider"/>
            </construct>
        </invoke-factory>
    </service>
</module>

I am able to add an interceptor to the Calculator service as a whole,
but can't figure out how to wrap just the Divider by a logger.

I tried adding the following:

    <extend-service service-id="org.fishies.math.Divider">
        <interceptor service-id="hivemind.LoggingInterceptor"/>
    </extend-service>

but it did nothing.  Harish did this in his example by adding a
separate module, log, with a simple module, but that seems to require
building a separate jar.


Bill


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to