Hi Raymond some comments below...
Simon On 9/9/07, Raymond Feng <[EMAIL PROTECTED]> wrote: > > Hi, > > I have been thinking of this problem as well. It's not realistic to search > for all CallableReferences because it can be dynamically created too. We Agreed. You would have to have registered them somewhere first. This is what happens in the case of the conversation scope container currently. probably need to use a listener pattern to have all the Conversation objects > listen on the events of expiration or end of the conversation and reset > the > state based on the event. Another way is to have a pointer to the This would rely on having the conversation object register with something that is able to broadcast these events. Where would be a sensible place to put this event broadcasting function. Do we have an internal eventing feature? Scope container? ScopeContainer in the ConversationImpl object and query the state of the > conversation before it's used. This would still involve updating the scope containers to record the conversation status against conversation id. But maybe this is an easier generic change. I.e. instigate a collection at the abstract level that allows conversationIds to be assoicated with the conversation object that created them. You could just store the conversation state and allow the conversation to ask for it as you suggest. Not clear to me what this buys though. By the current design, the ConversationScopeContainer is per component to > keep implementation instances by conversation id. So when the same > conversation involves two components, there are two > ConversationScopeContainer instances. > I think this design is sound. The missing link for us it so be able to access a conversation object given conversationId during callback at the client end. Thanks, > Raymond > > ----- Original Message ----- > From: "Simon Laws" <[EMAIL PROTECTED]> > To: "tuscany-dev" <[email protected]> > Sent: Sunday, September 09, 2007 4:15 AM > Subject: Resetting state of service references at conversation end > > > > When @ConversationEnd is called on a satefull callback the conversation > id > > of the client reference is not reset back to null. I have put a fix in > in > > the case where the scope of the originating component is CONVERSATION. > > This > > relies on storing the Conversation object in the conversational scope > > container so that when the instance is marked for removal the > conversation > > id can be set to null also. > > > > However to make this approach work for all scopes I have to go and add > > this > > feature to the other scope containers. Before I do this is there an easy > > way > > to get to all of a component instances CallableReferences from the > > JavaImplementationInvoker? If there were I could search for the > > conversation > > object with the matching conversationId rather than adding extra code to > > store it away. > > > > Simon > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
