This appears to be the answer:

 

          // Check if CXF can make a decision

          int cxfResult= super.compare(oper1, oper2);

          if (cxfResult != 0)

            return cxfResult;

 

          Int result = 0;        

          String s = … message body.

          String target= null;

          if (s.startsWith(“banana”))

            target= "updateFruit";

          else if (s.startsWith(“dog”))

            target= "updateAnimal";

          if (target!=null) {

            if (m1.equals(m2) && m1.equals(target))

              result = 0;

            else if (m1.equals(target))

              result= -1;

            else if (m2.equals(target))

              result= 1;

            else

              result= m1.compareTo(m2);

          }

          return result;

-- 
John Baker

On Mon, Jul 29, 2013, at 01:51 PM, John Baker wrote:
> 
> > The relevant RC method needs to help with ordering the method 
> > candidates, so return either -1 or 1 to help the runtime choose the 
> > right candidate
> 
> But what is "equal"? Is it the two resource infos pointing to
> updateFruit when i know the target is that method? So return 0 in that
> case?
> 
> And what's the algorithm when two different resource infos are passed,
> that may or may not be updateFruit?
> 
> (I think there may be an easier way to write this interface - simply
> list through the methods calling a method on an interface that returns
> true or false - but that's a discussion for another day.)

Reply via email to