Yes you should use the DOMDataBroker interface. It is not instanceof PingPongDataBroker b/c blueprint actually creates a proxy.
On Tue, Aug 23, 2016 at 10:26 AM, Martin Dindoffer < martin.dindof...@pantheon.tech> wrote: > But the "instanceof PingPongDataBroker" returns false. Are we supposed to > ignore that and just use it as DOMDataBroker interface? > > Thanks > ------------------------------ > *Od:* Tom Pantelis <tompante...@gmail.com> > *Odoslané:* 23. augusta 2016 14:57 > *Komu:* Robert Varga > *Kópia:* Martin Dindoffer; rele...@lists.opendaylight.org; > controller-dev@lists.opendaylight.org > *Predmet:* Re: [controller-dev] [release] Blueprint injects incorrect > implementation of DOMDataBroker > > I assume you printed the toString of the injected instance. > PingPongDataBroker extends from ForwardingObject which forwards toString > to the delegate which is the ConcurrentDOMDataBroker. Unfortunately this > hides the fact that it's actually the PingPongDataBroker. To confirm it > actually is, I implemented toString in PingPongDataBroker. So it does work > correctly. > > Also looking at the DOMDataBroker services in karaf, you can see what > you're bundle is using. Eg below, I changed the org.opendaylight. > controller.samples.clustering-it-provider bundle to import the > DOMDataBroker <service> with odl:type="pingpong": > > opendaylight-user@root>service:list DOMDataBroker > [org.opendaylight.controller.md.sal.dom.api.DOMDataBroker] > ---------------------------------------------------------- > osgi.service.blueprint.compname = domPingPongDataBroker > type = pingpong > service.id = 794 > Provided by : > org.opendaylight.controller.sal-broker-impl (135) > Used by: > org.opendaylight.controller.sal-binding-broker-impl (137) > org.opendaylight.controller.samples.clustering-it-provider (254) > > > > On Tue, Aug 23, 2016 at 6:13 AM, Robert Varga <n...@hq.sk> wrote: > >> On 08/23/2016 11:24 AM, Martin Dindoffer wrote: >> > Hi, >> > >> > I am trying to migrate Topoprocessing project to Blueprint. We need the >> > /org.opendaylight.controller.md.sal.dom.broker.impl.PingPongDataBroker/ >> > class, however when using: >> > >> > <reference id="dataBrokerImpl" >> > interface="org.opendaylight.controller.md.sal.dom.api.DOMDa >> taBroker" >> > odl:type="pingpong" /> >> > >> > blueprint injects the >> > /org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker >> > / >> > >> > / >> > / >> > >> > This looks like a bug in Controller, can someone please confirm? >> >> Looks like a bug to me. Can you file an issue in bugzilla, please? This >> would be a release blocker... >> >> Bye, >> Robert >> >> >> _______________________________________________ >> controller-dev mailing list >> controller-dev@lists.opendaylight.org >> https://lists.opendaylight.org/mailman/listinfo/controller-dev >> >> > MartinDindoffer > > Software Developer > > > Sídlo / Mlynské Nivy 56 / 821 05 Bratislava / Slovakia > R&D centrum / Bôrická cesta 107 / 010 01 Žilina / Slovakia > / martin.dindof...@pantheon.tech > reception: +421 2 212 93 331 / www.pantheon.sk > > [image: logo] > > >
_______________________________________________ controller-dev mailing list controller-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/controller-dev