[weld-dev] A ConversationManager API

Nicklas Karlsson nickarls at gmail.com
Sat Jan 30 14:17:48 EST 2010


>> 1. I don't understand the need for createTransientConversation and endTransientConversation if there is activateContext and deactivateContext. Why not something like setupConversation() / cleanupConversation() that always create a transient conversation that can be later promoted to long-running by restoreConversation / beginConversation.
>
> Yes, this is a reasonable proposal I guess, Nik, did we already iterate through this and discard?

Well, this is what the entire thread is about, finding the right
granularity ;-) Should we have lots of fine-grain methods that would
allow non-JSF frameworks to do pretty much anything or should we have
more coarse-grained stuff. We actually already have a weld-specific
ConversationManger API that looks pretty much like
beginOrRestoreConversation(String cid) and cleanupConversation(). This
was too coarse for some uses. So the balance is what we are looking
for, freedom of usage but we don't want unnecessary methods without
real usecases. I agree that the current proposal might be a bit
method-heavy.

>
>> 2. It would be useful to be able to force a new conversationId defined by the client with beginConversation(cid)
>
> Well this exists, with Convesation.begin(id), so I don't understand the request. This does raise the question of why there is an endConversation() method on ConversationManager tho...

That would be for ending background non-transient conversations.

---
Nik



More information about the weld-dev mailing list