Yes. Registering producers and consumers simply makes them available for
wiring. A management agent must create the desired wiring topology via the
WireAdmin service. This can be done before or after the producers and
consumers are registered.

~ John


                                                                       
             Dmytro                                                    
             Pishchukhin                                               
             <dmytro.pishchukh                                          To
             [email protected]>             Equinox development mailing list
             Sent by:                  <[email protected]>       
             equinox-dev-bounc                                          cc
             [email protected]                                            
                                                                   Subject
                                       Re: [equinox-dev] [WireAdmin] the
             01/07/2011 08:30          simplest test does not work     
             AM                                                        
                                                                       
                                                                       
             Please respond to                                         
                  Equinox                                              
                development                                            
               mailing list                                            
             <equinox-...@ecli                                         
                 pse.org>                                              
                                                                       
                                                                       




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


  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 <                                 
                         dmytro.pishchukhi                             
                         [email protected]>                                   To
                         Sent by:                                      
                         equinox-dev-bounc               equinox-...@eclip
                         [email protected]                  se.org        
                                                                       
                                                                        cc
                         01/07/2011 07:08                              
                         AM                                            
                                                                   Subject
                                                                       
                                                         [equinox-dev] 
                                                         [WireAdmin] the
                                                         simplest test 
             Please respond to                           does not work 
    Equinox development mailing list <                                 
         [email protected]>                                      
                                                                       
                                                                       
                                                                       
                                                                       



  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

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

<<inline: graycol.gif>>

<<inline: pic04214.gif>>

<<inline: ecblank.gif>>

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

Reply via email to