Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 89061 invoked from network); 24 Mar 2008 14:15:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Mar 2008 14:15:41 -0000 Received: (qmail 27884 invoked by uid 500); 24 Mar 2008 14:15:35 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 27848 invoked by uid 500); 24 Mar 2008 14:15:35 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 27833 invoked by uid 99); 24 Mar 2008 14:15:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2008 07:15:35 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bjneuman@comcast.net designates 76.96.30.80 as permitted sender) Received: from [76.96.30.80] (HELO QMTA08.emeryville.ca.mail.comcast.net) (76.96.30.80) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2008 14:14:54 +0000 Received: from OMTA10.emeryville.ca.mail.comcast.net ([76.96.30.28]) by QMTA08.emeryville.ca.mail.comcast.net with comcast id 4zel1Z00D0cQ2SLA80C600; Mon, 24 Mar 2008 14:14:10 +0000 Received: from [192.168.1.104] ([68.55.101.104]) by OMTA10.emeryville.ca.mail.comcast.net with comcast id 52F31Z00N2F8diU8W00000; Mon, 24 Mar 2008 14:15:05 +0000 X-Authority-Analysis: v=1.0 c=1 a=mV9VRH-2AAAA:8 a=vZ95Gs-pdszhAII78FAA:9 a=9w5v-RA7GuNovjG2kjUA:7 a=ZNt9_m7FqK2F8YuM5OrYjADeLG4A:4 a=JcB9aHnUDh0A:10 Subject: Re: Orchestra Conversation Problem From: Ben Neuman To: MyFaces Discussion In-Reply-To: <1206204512.6541.69.camel@simon-laptop> References: <1206155102.14251.17.camel@dell-desktop.example.com> <1206204512.6541.69.camel@simon-laptop> Content-Type: text/plain Date: Mon, 24 Mar 2008 10:04:13 -0400 Message-Id: <1206367453.6751.12.camel@dell-desktop.example.com> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Simon, Thanks for your input. Knowing that I was on the right track helped me to focus my thoughts and find the problem. First, I should admit that I told a little fib earlier. I actually used the myfaces orchestra example project for my tests. Since none of the examples were working either, I should have known to start from scratch. So I did and the results were much more positive. The conversation "creation date" was no longer getting updated on each request. But separateConversationContext links were still causing problems. Turns out I was embedding "commandLinks" but not the containing form. Fixing that cured all of my valuebound, unbound and new window issues. Thanks again for your help. Ben On Sat, 2008-03-22 at 17:48 +0100, simon wrote: > Hi Ben, > > On Fri, 2008-03-21 at 23:05 -0400, Ben Neuman wrote: > > I am looking at using Orchestra for one of my projects but I'm having > > issues getting started. > > I've created a very simple webapp with one managed bean: > > > > > class="org.neuman.ConversationAwareBean" > > scope="conversation.manual"/> > > > > public class ConversationAwareBean implements Serializable, > > ConversationBindingListener { > > > > private String creationDate; > > > > public ConversationAwareBean() { > > creationDate = new Date().toString(); > > } > > public void valueBound(ConversationBindingEvent arg0) > > { > > System.out.println("********** I've been bound > > *****************"); > > } > > > > public void valueUnbound(ConversationBindingEvent arg0) > > { > > System.out.println("********** I've been unbound > > *****************"); > > } > > > > public String getDummy() > > { > > return creationDate; > > } > > } > > > > Now, I have just a couple of very simple jsf pages that output the value > > of creation date. I expected this value to remain constant while working > > within any given conversation. It doesn't. The date is updated on every > > and any request from my jsf pages. > > Also, valueBound does get called once when the bean is first referenced. > > It is never called again after that. Even if I embed a link in a > > tag which opens a new window, valueBound > > will not be called again. > > > > So it seems that I am doing something terribly wrong or I just am > > failing to grasp how this is all supposed to work. Any help would be > > greatly appreciated. > > Your problem must be a simple configuration issue of some sort, because > what you've shown here looks ok, and the behaviour you expect is indeed > what should happen. > > But I can't think what might be wrong with your setup. In the normal > (not multiwindow) setup ou are getting the valueBound callback once (and > once only) which is correct. That seems to indicate that you have the > SpringVariableResolver created correctly, and that the bean is created > just once then later fetched from the appropriate conversation. > > You are using conversation.manual, not conversation.access, so there is > no possibility of the conversation being automatically discarded. > [check: the spring scope definition named "conversation.manual" does NOT > have , right?] > > You should see a query parameter "?conversationContext=1" appended to > all urls - except the one wrapped in the o:separateConversationContext. > If that is not happening for some reason, then you will get a new > conversation created for each request, and therefore the new date each > time. But in that case I would expect the valueBound method to be called > repeatedly which is not happening. > > Odd. > > All I can suggest is to compare your web.xml and spring config files > carefully against what is documented on the website, and what is in the > examples project: > http://svn.apache.org/repos/asf/myfaces/orchestra/trunk/examples/ > > You could also try enabling debug-level logging for category > "org.apache.myfaces.orchestra" and seeing if anything odd is being > reported there. > > Regards, > Simon >