j4ever schrieb: > Hello everyone, > i’m developing a web application with JSF, Spring, Hibernate and Orchestra > and accoutering a problem with the orchestra’s conversation scope. I have > configured all my managed beans with Spring and have used thereby a “manual” > conversation scope (Orchestra) for some beans. > The “session” and “request” beans all work as expected. But for the “manual” > beans, I’ve noticed through debugging that the constructor of the bean is > called when I submitted the corresponding JSF page (e.g. through a click to > a button to execute some action). This is, the bean is initialized again > with a new instance, although I have not end the conversation. So the page > is redisplayed with the values of the new instance of the bean. This is of > course not the behavior I intend to implement. I want the page to be > refreshed with the new values of the beans, obtained after action > processing. I guess, this is the quintessence of orchestra conversation > scoped functionalities and I just don’t understand why I can’t get this > work. May be I‘ve Overseen something. So I would appreciate any help. > Many thanks in advance. > Hugues > This is the archestra relevant part of my Spring configuration: > <!-- the orchestra conversation scopes --> > <bean > class="org.springframework.beans.factory.config.CustomScopeConfigurer"> > <property name="scopes"> > <map> > <entry key="conversation.access"> > <bean > class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope"> > <property name="lifetime" value="access"/> > </bean> > </entry> > <entry key="conversation.manual"> > <bean > class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope"> > <property name="lifetime" value="manual"/> > </bean> > </entry> > </map> > </property> > </bean> > … > <bean id="rolesBean" > class="com..accounting.business.beans.RolesBean" > scope="conversation.manual"> > <aop:scoped-proxy /> > <constructor-arg ref="baseDAO" /> > <constructor-arg ref="accountingService" /> > <constructor-arg ref="messagesManager" /> > <constructor-arg ref="login" /> > </bean> >
In the URL shown in your browser, do you see ...?conversationContext=1 If this query parameter is not there, or if it changes on each request then you are getting a new "conversation context" for each request, which would explain your problem. Orchestra automatically adds this query parameter to all links/forms in a page, so this should work automatically. But maybe your app is doing something that prevents this query param from being added... Regards, Simon -- -- Emails in "mixed" posting style will be ignored -- (http://en.wikipedia.org/wiki/Posting_style)

