On 25/08/2011 20:53, Greg Dritschler wrote:
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

Greg,

Yuk, pretty ugly.

I'd be happy if the SCA runtime barfed if it saw @AsyncInvocation being used 
like that.

It isn't a good pattern to encourage since it consumes server resources and is 
susceptible to failures.

As for fixing the spec to disallow this usage - maybe V1.2 could address that.


Yours,  Mike.

Reply via email to