Duh? Reference method invocation?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Duh? Reference method invocation?

Ranx0r0x
I just realized that invariably when I use a <reference> to a service I'm
turning around and injecting into local bean and using it via the interface.
I can bind a listener to an interface but don't really do that much either.

Essentially I want to do something akin to this but can't recall the syntax.

        <reference id="configurator"
interface="foo.esb.cxf.busconfigurator.api.CxfBusConfigurator">
          <property name="configurators">
                                <map>
                                        <entry key="someBus" value-ref="developmentBusConfiguration" />
                                </map>
                        </property>
  </reference>



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Duh? Reference method invocation?

Ranx0r0x

This is how I'm used to using services (either this way or using Camel's
@BeanInject) so really haven't tried grabbing a reference in blueprint and
then invoking one of its methods in blueprint itself. Is it even possible?


    <reference id="bookingService"
interface="org.apache.karaf.examples.blueprint.common.BookingService"/>

    <bean id="clientService"
class="org.apache.karaf.examples.blueprint.client.ClientServiceImpl">
        <property name="bookingService" ref="bookingService"/>
    </bean>




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