Hi Craig !

The main problem you will face, is that the interface attribute on the component as you configured it is not used anywhere :-[ .
Interface based routing is mainly scheduled for version 2.0 of ServiceMix.
If you want to try it, you could use 2.0 snapshots, and I will gladly fix
any issues you could find.

Cheers,
Guillaune Nodet

Craig Walls wrote:

Now that I have (most) of my clustering frustrations behind me, I'm trying
to send a message to an interface instead of by explicitly naming a
service. I looked for unit-tests and examples to guide me, but to no
avail.

Nevertheless, I tried setting the interface name on the exchange instead
of setting the service:

   InOnly exchange = serviceMixClient.createInOnlyExchange();
   exchange.setInterfaceName(new QName("foo"));

And setting the interface attribute on the component:

   <component id="billing"
       service="billing"
       interface="foo"
       class="com.habuma.telco.sm.components.BillingServiceImpl">
      ...
   </component>

This did not work. I got a message saying "SericeName (null) specified for
routing but can't find it registered"

Looking at the source code for org.servicemix.jbi.nmr.Broker I see that
code that should be locating the component by interface and am trying to
figure out from that code what I'm doing wrong. But even then, I have a
few questions:

1. Shouldn't the warning log message be "InterfaceName ("+interfaceName+")
specified for routing, but can't find it registered"? At this point in the
code we're trying to lookup by interface name, not service name, so it
seems that the warning message is wrong. (BTW, I'm happy to see that the
latest code in SVN has corrected the typo in "SericeName".)

2. Is there something obvious from the code snippets above that I'm doing
wrong?

3. Does anybody have any example code that they could share that shows how
to send messages by interface instead of by service name?







Reply via email to