I agree that the DomainRegistry should have the equivalent synchronous
version.

While we're on this subject, I happened to be wondering today whether
@AsyncInvocation obligates the service implementation to use the async
service interface?  Obviously it makes the most sense to use them together,
but is that required?  As a service implementer, could I use
@AsyncInvocation with the normal synchronous interface?  This would mean the
service implementation completes "inline" so to speak and has no need for a
ResponseDispatch object.  Since @AsyncInvocation is used, the SCA runtime is
obligated to provide a suitable thread for a long-running request, and the
binding still must support an asynchronous response.  Effectively, it means
the SCA runtime would do the ResponseDispatch call on behalf of the
implementation at the completion of the method.

I'm not terribly excited about supporting such a thing, but I didn't see
anything in the spec that suggests either way whether it's allowed or
disallowed.

Greg

On Thu, Aug 25, 2011 at 1:03 PM, Simon Laws <[email protected]>wrote:

> On Thu, Aug 25, 2011 at 2:49 PM, ant elder <[email protected]> wrote:
> > Looking to fix TUSCANY-3931 about the clients not working with the
> > wsdl in the domain registry for async services and i wonder what the
> > wsdl should really look like. For example with the service interface:
> >
> > @AsyncInvocation
> > public interface Service1AsyncServer {
> >        @AsyncFault( {BusinessFault1.class, BusinessFault2.class} )
> >        public void operation1Async( String input,
> ResponseDispatch<String> handler );
> > }
> >
> > would we expect the generated wsdl that goes in the domain registry be
> > that or the equivalent synchronous version, so with an operation1
> > instead of operation1Async?
> >
> >   ...ant
> >
>
> My immediate answer would be that it should look like the synchronous
> version with the asyncInvocation intent attached.
>
> When we are matching interfaces we are comparing the synchronous
> version because that's what the statement of the service interface
> looks like.
>
> Bindings have to decide how to support async invocations. We current
> support two models which allow native and non-native support. Our web
> services binding doesn't support async natively so I  would guess that
> ?wsdl to the async endpoint results in the synch WSDL (don't know if
> it's appropriately decorated). If it did provide native support would
> we expect it to represent the async flow explicitly. No sure but we
> can look to see it Axis says anything about what it does in the async
> case.
>
> Simon
>
> --
> Apache Tuscany committer: tuscany.apache.org
> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>

Reply via email to