No, I just register Producer and Consumer services.

Do I have to call any WireAdmin methods additionally to create wire?

Best regards,
Dmytro Pishchukhin


On Fri, Jan 7, 2011 at 15:01, John W Ross <[email protected]> wrote:

>  Are you connecting the consumer to the producer by calling
> WireAdmin.createWire("producer.all", "consumer.all", null)?
>
> ~ John
>
>
> [image: Inactive hide details for Dmytro Pishchukhin ---01/07/2011 07:10:56
> AM---Hello All,]Dmytro Pishchukhin ---01/07/2011 07:10:56 AM---Hello All,
>
>
>     *Dmytro Pishchukhin <[email protected]>*
>             Sent by: [email protected]
>
>             01/07/2011 07:08 AM
>             Please respond to
>             Equinox development mailing list <[email protected]>
>
>
> To
>
> [email protected]
> cc
>
>
> Subject
>
> [equinox-dev] [WireAdmin] the simplest test does not work
> Hello All,
>
> I'm trying to run a simple WireAdmin Producer/Consumer test.
>
> List of bundles I use:
>
> osgi> ss
> Framework is launched.
> id      State       Bundle
> 0       ACTIVE      org.eclipse.osgi_3.6.1.R36x_v20100806
> 1       ACTIVE      org.eclipse.osgi.services_3.2.100.v20100503
> 2       ACTIVE      org.eclipse.osgi.util_3.2.100.v20100503
> 3       ACTIVE      org.eclipse.equinox.common_3.6.0.v20100503
> 4       ACTIVE      org.eclipse.equinox.registry_3.5.0.v20100503
> 5       ACTIVE      org.eclipse.equinox.util_1.0.200.v20100503
> 6       ACTIVE      org.eclipse.equinox.log_1.2.100.v20100503
> 7       ACTIVE      org.eclipse.equinox.ds_1.2.1.R36x_v20100803
> 8       ACTIVE      org.eclipse.equinox.preferences_3.3.0.v20100503
> 9       ACTIVE      org.eclipse.equinox.event_1.2.0.v20100503
> 10      ACTIVE      org.eclipse.equinox.cm_1.0.200.v20100520
> 11      ACTIVE      org.eclipse.equinox.wireadmin_1.0.200.v20100503
> 12      ACTIVE      wireadmin_test_1.0.0.SNAPSHOT
>
> Producer and Consumer are both DS components
>
> Producer:
> ....
> protected void activate(ComponentContext context) {
>         Hashtable props = new Hashtable();
>         //the producer will be sending String data (flavors)
>         Class[] flavors = new Class[]{String.class};
>         props.put(WireConstants.WIREADMIN_PRODUCER_FLAVORS, flavors);
>         //the producer PID property
>         props.put("service.pid", "producer.all");
>         reg =
> context.getBundleContext().registerService(Producer.class.getName(), this,
> props);
>     }
> .....
>
> Consumer:
> ....
>  protected void activate(ComponentContext context) {
>         Hashtable prop = new Hashtable();
>         //this property shows that the consumer will accept any data types
>         prop.put(WireConstants.WIREADMIN_CONSUMER_FLAVORS, new
> Class[]{Object.class});
>         //the identifier property of the consumer
>         prop.put("service.pid", "consumer.all");
>         //registering the service on the framework
>         reg =
> context.getBundleContext().registerService(Consumer.class.getName(), this,
> prop);
>     }
> ....
>
> Debug Info from WireAdmin:
> DEBUG 11 Notification event ; Producer com.acme.produceri...@97d3f0;
> source: null; wires null
> DEBUG 11  [0] 10001 : asynchronous
> DEBUG 11 Notification event ; Consumer com.acme.consumeri...@c28cb7;
> source: null; wires null
> DEBUG 11  [0] 10001 : asynchronous
>
> I do not see any mistakes in my code and configuration. Maybe, you can find
> any :)
>
> Thanks in advance.
>
> Best regards,
> Dmytro Pishchukhin_______________________________________________
>
> equinox-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>
> _______________________________________________
> equinox-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>

<<graycol.gif>>

<<ecblank.gif>>

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to