[weld-dev] A ConversationManager API

Pete Muir pmuir at redhat.com
Sun Jan 31 11:48:26 EST 2010


On 30 Jan 2010, at 19:22, Nicklas Karlsson wrote:

>>> then NKarlsson's ConversationManager interface has more methods than the CDI version above, no?  So what do you mean by "These are already available on CDI's Conversation interface."?  I think that ConversationManager is a better name for a manager component than simply Conversation.
>> 
>> These API are for different purposes, Conversation is for user control of the conversation, ConversationManager is an SPI that frameworks which integrate with Weld can use to control the built in conversation context.
> 
> Yes, a Conversation is pretty much a plain parameter object that is
> tossed around and evaluated at the end of the request by the CM.
> 
>> 
>>>  What if I wanted to getTimeout() of a non-current conversation in the case there are multiple concurrent conversations in the current session?
>> 
>> In that case, we need to know the use case.
>> 
>> This can easily be solved by changing getConversations to return a Map.
> 
> Hmm, I'm not that big of a fan of returning anything with a
> Conversation in it since the implementation is a request scoped bean
> and therfore proxied if stuck in a Map so it needs some "dehydration"
> anyway to a normal object with similar attributes (well, actually only
> the cid and the timout are interesting from a CM point of view)

Don't really agree with this. For a start, the reason the Conversation bean is Request scoped is due to the conversation management in the spec, the actual conversation object is just that, an object. You can stick this in a Map.


More information about the weld-dev mailing list