While reviewing support for conversational services there were a few
outstanding issues (https://issues.apache.org/jira/browse/TUSCANY-1511). A
couple of these issues require a little clarification of the SCA
specifications. Can someone with their SCA spec hat on help out? Here are
the two primary issues:

1/ Stateful Callbacks - Given the the following scenario where the
ConversationalClient has a reference to a ConversationalService

@Remotable
@Conversational
public interface ConversationalCallback {
  ...
}

@Remotable
@Conversational
@Callback(ConversationalCallback.class)
public interface ConversationalService {
  ....
}

@Scope("CONVERSATION")
public class ConversationalClientImpl implements ConversationalClient,
ConversationalCallback {
    @Reference
    protected ConversationalService conversationalService;
  ....
}

@Scope("CONVERSATION")
public class ConversationalServiceImpl implements ConversationalService {
    @Callback
    protected ConversationalCallback conversationalCallback;
  ...
}

In the current implementation the specification has been interpreted to mean
that the "client" component, i.e. the component implementing the callback
interface, must be marked as having conversational scope if it is required
that callback messages return to the same instance of the client component
that originated the conversational call. Is this the correct interpretation
of the specification, in particular Section 1.6.7.1 of the SCA Java
Annotations and APIs V1.0 specification.


2/ The specifications describe the freeing of state associated with a
conversation when Conversation.end() is called on a conversation object .
See section 1.6.5 of the SCA Java Annotations and APIs V1.0 specification.

Assuming that the Conversation object is available from a service reference
within the client of the conversation then, in the current implementation,
the state associated with the conversation held by the service will not be
freed directly if end() is called.

A separate message exchange would be required between client and service to
carry this end() instruction directly. As it stands the target conversation
will eventually time out.

What is the specification's intention in this case?

Regards

Simon

Reply via email to