[weld-dev] A ConversationManager API

Nicklas Karlsson nickarls at gmail.com
Sat Jan 30 14:22:39 EST 2010


>> 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)

But do hit me with a usecase.
---
Nik



More information about the weld-dev mailing list