Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Well, Let's see</p> <blockquote> <p>The first time gate into the page, I get this appended in my URL: <strong>?conversationId=97</strong></p> </blockquote> <p>ok. As said by Seam in Action book</p> <blockquote> <p>Seam, by default, creates a Temporary conversation to serve the current request. A Temporary conversation <strong>is initialized</strong> immediately following <em>restore view</em> phase of the JSF life cycle and <strong>is destroyed</strong> after the <em>render response</em> phase.</p> </blockquote> <p>And</p> <blockquote> <p>After a minute or two, and at seamingly random time, I get an exception saying that there is no context.</p> </blockquote> <p>Each conversation can have its own Timeout period, which <strong>defaults to the global Timeout setting</strong></p> <pre><code>/WEB-INF/components.xml &lt;core:manager conversation-timeout="1000000"/&gt; </code></pre> <p>Or page-specific</p> <pre><code>&lt;page view-id="/app.xhtml" timeout="1000000"/&gt; </code></pre> <p>Its value <strong>is specified in milliseconds</strong>. But <strong>it must exceed</strong> session Timeout defined in web.xml</p> <pre><code>/WEB-INF/web.xml &lt;!--specified in minutes--&gt; &lt;session-config&gt; &lt;session-timeout&gt;30&lt;/session-timeout&gt; &lt;/session-config&gt; </code></pre> <p>Maybe it explains why you get your exception. </p> <p>But if you really want to know whether you have long-running conversation, Seam stores a built-in conversation-scoped component named <strong>conversation</strong>. So <strong>inside your Managed bean</strong>, do as follows to know whether you have a long-running conversation</p> <pre><code>org.jboss.seam.core.Conversation conversation = (Conversation) Component.getInstance("conversation"); System.out.println(conversation.isLongRunning()); </code></pre> <p>If you see <strong>true</strong>, someway you have started a long-running conversation. You can even see inside your page</p> <pre><code>#{conversation.longRunning} </code></pre> <p>I hope it can be useful to you.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload