For awhile I had assumed the methods involved in invoking a service w/ a
callback would always have void return types, such as the example in the
Java C&I spec:

public interface MyService {
   public void someMethod(String arg);
}

public interface MyServiceCallback {
   public void receiveResult(String result);
}

I'd assumed they'd always be defined like this so each direction could be
implemented with a non-blocking call.

However, when pressed I couldn't find anywhere in the specs which said this
had to be the case.  The specs don't seem to disallow passing return data in
either
direction of the bi-directional service.

On M2 code I tried a variation similar to:

public interface MyService {
   public String someMethod(String arg);
}

public interface MyServiceCallback {
   public String receiveResult(String result);
}

with both "client" and "server" in the same Composite.

I noticed that the client didn't block when invoking 'someMethod' and
therefore lost the return String.  However the callback of the receiveResult
did block and the result was
successfully passed back to the service which invoked the callback service.

Is the non-blocking (and loss of return data) a simple bug worthy of a JIRA
or does this require some more discussion on the list?

Opinions?

Thanks,
Scott Kurz

Reply via email to