Hi Damon, Hi Michael<br><br>Thanks for your feedback.<br><br>I&#39;ll try to see if it would be possible to enhance the Stateful Server so that 2 URLs are handled <br>with 2 differents Agents.<br><br>My use case is that 2 differents Portlets, in the same WAR, must be able to use 2 differents<br>
set of rules. And so far, as you explained, there&#39;s a single Questionnaire per HTTP Session.<br><br>Not a big issue, we might be able to find a solution, based on the URI for instance. <br><br>I&#39;ll try to see if I can adapt-it<br>
:-)<br>Thanks <br><br>Regards, Nicolas<br><br>(yes, from Paris/France ;-) )<br><br><div class="gmail_quote">2010/2/27 Damon Horrell <span dir="ltr">&lt;<a href="mailto:Damon.Horrell@solnetsolutions.co.nz">Damon.Horrell@solnetsolutions.co.nz</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">I think the problem though is that there is only one session so when you hit the second url, then nothing happens because you already have a session established.  (The branching-example has 3 different agents and I had to delete the knowledgeSession when switching between them otherwise I&#39;m pretty sure it just stayed with the original one.)<br>
<br>In a portal environment, the different portlets almost need to behave like different users.<br><br>Currently Tohu only supports there being a single Questionnaire per session, so we&#39;d either have to enhance that so that there were two independent ones within the session for each portlet, or change the execution server so that each agent url has a different knowledgeSession behind it (could this be a simple configuration option cos the current behaviour is also useful).<br>
<br>Another approach (which Nicholas could try) might be just to have a single agent and a single Questionnaire for the whole application and write some custom javascript so that each portlet only fetched the parts of the Questionnaire that it should display (probably using Groups).  i.e. it would be a bit like a 2-page Questionnaire but where each page was actually each portlet.  I haven&#39;t really thought this through fully though so this might not acually work easily.<br>
<div><br>Damon<br><br></div><font color="#990099">-----Michael Neale &lt;<a href="mailto:michael.neale@gmail.com" target="_blank">michael.neale@gmail.com</a>&gt; wrote: -----<br><br></font><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid rgb(0, 0, 0); margin-right: 0px;">
To: Damon Horrell &lt;<a href="mailto:Damon.Horrell@solnetsolutions.co.nz" target="_blank">Damon.Horrell@solnetsolutions.co.nz</a>&gt;<br>From: Michael Neale &lt;<a href="mailto:michael.neale@gmail.com" target="_blank">michael.neale@gmail.com</a>&gt;<br>
Date: 02/27/2010 01:21PM<br>cc: Nicolas Martignole &lt;<a href="mailto:nicolas@touilleur-express.fr" target="_blank">nicolas@touilleur-express.fr</a>&gt;, <a href="mailto:tohu-users@lists.jboss.org" target="_blank">tohu-users@lists.jboss.org</a><br>
Subject: Re: [tohu-users] Stateless/stateful servlet in Tohu<div><div></div><div class="h5"><br><br>Yes different URLs should result in different agents being loaded (each will have their own config, so there has to be a matching config file for &quot;
<span>sample2&quot;. 
</span><div>
<font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;"><br></span></font></div><div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;">There was some talk around stateless - the idea being that all question/answer state is kept on the client and passed as needed (say in a cookie) and this could work in theory for very small amounts of data. <br>

</span></font><br><div class="gmail_quote">On Sat, Feb 27, 2010 at 10:50 AM, Damon Horrell 
<span dir="ltr">&lt;
<a href="mailto:Damon.Horrell@solnetsolutions.co.nz" target="_blank">Damon.Horrell@solnetsolutions.co.nz
</a>&gt;
</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">Hi Nicolas,<br>
<br>It&#39;s good to see someone on the other side of the world using Tohu :-)<br><br>Tohu requires that you use the stateful session because only changes are sent back and forth between the client and server, and so that state needs to be maintained on the server.  Stateless would be useful for a scenario where the rules are just doing some sort of one-off calculation based on the inputs provided.<br>
<br>Michael will need to answer re whether the execution server is able to run 2 agents simultaneously and how to to that.  In the meantime, you could work around this problem by creating a separate war file for each and deploying them both to your app server.  I have had a number of Tohu applications running simultaneously this way, which is exactly what you need for use within a portal.<br>
<br>Regards, Damon<br><br><div><br></div><font color="#990099">-----
<a href="mailto:tohu-users-bounces@lists.jboss.org" target="_blank">tohu-users-bounces@lists.jboss.org
</a> wrote: -----<br><br></font><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid rgb(0, 0, 0); margin-right: 0px;">
To: 
<a href="mailto:tohu-users@lists.jboss.org" target="_blank">tohu-users@lists.jboss.org
</a><br>From: Nicolas Martignole &lt;
<a href="mailto:nicolas@touilleur-express.fr" target="_blank">nicolas@touilleur-express.fr
</a>&gt;<br>
Sent by: 
<a href="mailto:tohu-users-bounces@lists.jboss.org" target="_blank">tohu-users-bounces@lists.jboss.org
</a><br>Date: 02/27/2010 05:42AM<br>Subject: [tohu-users] Stateless/stateful servlet in Tohu
<div><div></div><div><br><br>Hi Michael<br><br>JBoss Tohu is really a great project. I worked on a Grails similar project<br>few months ago, and I was really happy to discover Tohu later.<br><br>My first question is about the Stateless/stateful URL and Servlet in Tohu implemented in Scala. <br>
<br>I understood how to close a session with the URI and dispose-session<br>in stateful mode. However, and because I&#39;m a beginner with Scala,<br>what are the main differences between the stateless and the stateful servlet <br>

in JBoss Tohu ? <br><br>My Portlet has 2 view modes : normal and maximized. Each view mode<br>is in fact a simple JSP. I oberved that if I use the stateful mode, and <br>I try to load 2 separates context/scenarion (with /stateful/sample1 and /stateful/sample2)<br>

then the 2nd state is never loaded. <br><br>I&#39;d like to understand a little bit more this part of Tohu<br><br>Thanks for your help, and for the great work<br><br>Nicolas<br><br><br>
</div></div><font face="Courier New,Courier,monospace" size="3">_______________________________________________<br>tohu-users mailing list<br><a href="mailto:tohu-users@lists.jboss.org" target="_blank">tohu-users@lists.jboss.org
</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/tohu-users" target="_blank">https://lists.jboss.org/mailman/listinfo/tohu-users
</a><br></font>
</blockquote><br></font>
Attention:
This email may contain information intended for the sole use of
the original recipient. Please respect this when sharing or
disclosing this email&#39;s contents with any third party. If you
believe you have received this email in error, please delete it
and notify the sender or 
<a href="mailto:postmaster@solnetsolutions.co.nz" target="_blank">postmaster@solnetsolutions.co.nz
</a> as
soon as possible. The content of this email does not necessarily
reflect the views of Solnet Solutions Ltd.<br>_______________________________________________<br>
tohu-users mailing list<br>
<a href="mailto:tohu-users@lists.jboss.org" target="_blank">tohu-users@lists.jboss.org
</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/tohu-users" target="_blank">https://lists.jboss.org/mailman/listinfo/tohu-users
</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Michael D Neale<br>home: 
<a href="http://www.michaelneale.net" target="_blank">www.michaelneale.net
</a><br>blog: 
<a href="http://michaelneale.blogspot.com" target="_blank">michaelneale.blogspot.com
</a><br>
</div>
</div></div></blockquote><br></font><div><div></div><div class="h5">
Attention:
This email may contain information intended for the sole use of
the original recipient. Please respect this when sharing or
disclosing this email&#39;s contents with any third party. If you
believe you have received this email in error, please delete it
and notify the sender or <a href="mailto:postmaster@solnetsolutions.co.nz" target="_blank">postmaster@solnetsolutions.co.nz</a> as
soon as possible. The content of this email does not necessarily
reflect the views of Solnet Solutions Ltd.
</div></div><br>_______________________________________________<br>
tohu-users mailing list<br>
<a href="mailto:tohu-users@lists.jboss.org">tohu-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/tohu-users" target="_blank">https://lists.jboss.org/mailman/listinfo/tohu-users</a><br>
<br></blockquote></div><br>