Yes, the spec says they can&#39;t cross session boundaries but it could be added to the javadocs<br><br><div class="gmail_quote">On Mon, Feb 1, 2010 at 1:26 PM, Henri Chen <span dir="ltr">&lt;<a href="mailto:henrichen@zkoss.org">henrichen@zkoss.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I think these APIs are good enough for me.<br>
<br>
One thing needs clarification though. The ConversationManager itself is SessionScoped, right? So the getConversations() method returns all long running conversion in this Session?<br><font color="#888888">
<br>
Henri Chen<br>
The ZK Team<br>
<a href="http://www.zkoss.org" target="_blank">http://www.zkoss.org</a></font><div><div></div><div class="h5"><br>
<br>
Nicklas Karlsson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Let&#39;s try it the other way around. I toss you the minimal JSF-centric API and the *framework reps of ZK, GraniteDS, SE and Remoting can speak up on what they need more control of along with their usecase* then Pete can comment and I just act as a secretary ;-) That way we don&#39;t end up with too many &quot;nice to haves&quot; in the API that could be worked around more or less easy.<br>

<br>
public interface ConversationManager<br>
{<br>
  /**<br>
   * Checks the state of the conversation context<br>
   *<br>
   * @return true if the conversation context is active, false otherwise<br>
   */<br>
  public abstract boolean isContextActive();  // usecase: the conversation checks for active context before running methods<br>
   /**<br>
   * Activates the conversation context<br>
   *<br>
   * @return The conversation manager<br>
   *<br>
   * @throws IllegalStateException if the context is already active<br>
   */    public abstract ConversationManager activateContext();<br>
// usecase: any non-JSF framework will want to run this themselves<br>
   /**<br>
   * Deactivates the conversation context<br>
   *<br>
   * @return The conversation manager<br>
   *<br>
   * @throws IllegalStateException if the context is already deactive<br>
   */    public abstract ConversationManager deactivateContext();<br>
// usecase: any non-JSF framework will want to run this themselves<br>
<br>
  /**<br>
   * Resumes a long running conversation. If the cid is null, nothing is done and the current<br>
   * transient conversation is resumed<br>
   *<br>
   *<br>
   * @param cid The conversation id to restore<br>
   * @return The conversation manager<br>
   * @throws NonexistentConversationException If the non-transient conversation is not known<br>
   * @throws BusyConversationException If the conversation is locked and not released while waiting<br>
   * @throws IllegalStateException if the conversation context is not active<br>
   */<br>
  public abstract ConversationManager beginOrRestoreConversation(String cid);<br>
// usecase: start of the conversation lifecycle.<br>
   /**<br>
   * Destroys the current conversation if it&#39;s transient. Stores it for conversation<br>
   * propagation if it&#39;s non-transient<br>
   *<br>
   * @return<br>
   * @throws IllegalStateException if the conversation context is not active<br>
   */<br>
  public abstract ConversationManager cleanupConversation();<br>
// usecase: end of the conversation lifecycle.<br>
   /**<br>
   * Gets the current non-transient conversations<br>
   *<br>
   * @return The conversations mapped by id<br>
   * @throws IllegalStateException if the conversation context is not active<br>
   */<br>
  public abstract Map&lt;String, Conversation&gt; getConversations();<br>
// usecase: Conversation checks if begin(String) was called with a known cid (no need for a isCidInUse, actually)<br>
<br>
  /**<br>
   * Returns a new, session-unique conversation ID<br>
   *<br>
   * @return The conversation id<br>
   * @throws IllegalStateException if the conversation context is not active<br>
   */    public abstract String generateConversationId();<br>
// usecase: Conversation gets a cid for begin()  <br>
Notice that the begin and end of lifecycle are big chunks. Speak up where you need more granularity. Also speak up if you want fancy switching stuff etc ;-) *Re-submit any wishes/suggestions you&#39;ve done in the past* in this thread (method signature + usecase) so we can keep stuff together.<br>

<br>
---<br>
Nik<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>---<br>Nik<br>