-----Original Message-----
From: Simon Kitching [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2008 2:38 PM
To: MyFaces Discussion
Subject: Re: [Orchestra] conversions and AJAX calls
Hi Petr,
Juza Petr schrieb:
Hello,
I have please problem with conversations and AJAX calls.
I use grid view component from NetAdvantage
(http://java.samples.infragistics.com/NetAdvantage/JSF/2008.1/featurebro
wser/webgrid/rowSelection/index.faces) that is AJAX-based (pagination,
sorting).
I have detail page with one grid view. There is detailBean related to
detail page set with "conversation.access" scope.
I see from logs this behavior:
1) user visits detail page, conversation starts
2) user clicks to go to next page on grid view, AJAX call is processed
-> conversation is deleted!
3) user clicks to go to next page on grid view -> error occures
because
detailBean has wrong data, because new conversation is created.
I don't know why this happen because detailBean is called during AJAX
call.
I also attach some HTTP headers from AJAX call:
(Request-Line) POST
/rmt/assetDetail.faces?conversationContext=1
HTTP/1.1
Host localhost:8080
Keep-Alive 300
Connection keep-alive
Content-Type application/x-www-form-urlencoded; charset=UTF-8
Referer
http://localhost:8080/rmt/assetDetail.faces?conversationContext=1
Content-Length 19939
Cookie JSESSIONID=010F3FDC8F110E8A52707E12EDBD4672
Pragma no-cache
Cache-Control no-cacheconversation.access
I would appreciate any help.
Thank you in advance,
PETER
First, when sending emails to the myfaces list, please put the project
name in the email subject. We now have a lot of different projects
sharing this mailing list, and that ensures that people can see which
emails are about the projects they are involved in. I've already
modified the subject line of this reply...
This is going to be a rather tricky one to diagnose I think.
You say "detailBean is called during AJAX call". Can you please provide
further details on this?
Please also enable debug-level logging for the category
"org.apache.myfaces.orchestra" and check those messages for anything
useful.
Regards, Simon
When I put breakpoint into detailBean a see that execution is stopped in
that place.
I attach some debug information:
Bean started ...
2008-08-27 14:59:18,593 DEBUG
[org.apache.myfaces.orchestra.conversation.spring.OrchestraAdvisorBeanPo
stProcessor]: Processing scope [conversation.access]
2008-08-27 14:59:18,593 DEBUG
[org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator]:
Creating implicit proxy for bean 'assetDetailController' with 0 common
interceptors and 1 specific interceptors
2008-08-27 14:59:18,593 DEBUG
[org.apache.myfaces.orchestra.conversation.Conversation]: put bean to
conversation:org.springframework.beans.factory.support.DisposableBeanAda
[EMAIL PROTECTED](bean=org.apache.myfaces.orchestra.conversation.spring.Abstr
[EMAIL PROTECTED])
2008-08-27 14:59:18,593 DEBUG
[org.apache.myfaces.orchestra.conversation.Conversation]: put bean to
conversation:assetDetailController(bean=com.anect.rmt.web.controllers.as
[EMAIL PROTECTED])
2008-08-27 14:59:22,496 DEBUG
[org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory]:
getFacesContext: entry
2008-08-27 14:59:22,496 DEBUG
[org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory]:
getFacesContext: creating custom instance
2008-08-27 14:59:22,496 DEBUG
[org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory$1]:
getFacesContext: running inner constructor
2008-08-27 14:59:22,496 DEBUG
[org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory$1]:
Running inithandler of type
org.apache.myfaces.orchestra.lib.jsf.ContextLockRequestHandler
2008-08-27 14:59:22,496 DEBUG
[org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory$1]:
Running inithandler of type
org.apache.myfaces.orchestra.lib.jsf.FrameworkAdapterRequestHandler
2008-08-27 14:59:22,527 DEBUG
[org.apache.myfaces.orchestra.lib.jsf.FrameworkAdapterRequestHandler]:
init
2008-08-27 14:59:22,543 DEBUG
[org.apache.myfaces.orchestra.lib.jsf.FrameworkAdapterRequestHandler]:
creating jsfFrameworkAdapter
2008-08-27 14:59:22,543 DEBUG
[org.apache.myfaces.orchestra.frameworkAdapter.jsf.JsfFrameworkAdapter]:
Beginning request
2008-08-27 14:59:22,543 DEBUG
[org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory$1]:
Running inithandler of type
org.apache.myfaces.orchestra.lib.jsf.ConversationManagerRequestHandler
2008-08-27 14:59:22,543 DEBUG
[org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory$1]:
Running inithandler of type
org.apache.myfaces.orchestra.lib.jsf.DataSourceLeakRequestHandler
2008-08-27 14:59:22,543 DEBUG
[org.apache.myfaces.el.VariableResolverImpl]: Variable 'assetDetail'
could not be resolved.
2008-08-27 14:59:22,559 DEBUG
[org.apache.myfaces.el.VariableResolverImpl]: Variable
'org.apache.myfaces.orchestra.conversation.FlashScopeManager' could not
be resolved.
2008-08-27 14:59:22,559 DEBUG
[org.apache.myfaces.el.VariableResolverImpl]: Variable
'org.apache.myfaces.orchestra.conversation.FlashScopeManagerConfiguratio
n' could not be resolved.
2008-08-27 14:59:22,574 INFO
[org.apache.catalina.core.ApplicationContext]: INFRAGISTICS: Start
rendering a SmartRefresh request (AJAX call)
2008-08-27 14:59:22,652 DEBUG
[org.apache.myfaces.orchestra.conversation.jsf.AccessScopePhaseListener]
: Clearing access-scoped conversation assetDetailController after
rendering view /assetDetail.jsp
2008-08-27 14:59:22,652 DEBUG
[org.apache.myfaces.orchestra.conversation.Conversation]: destroy
conversation:assetDetailController
Bean destroid ...
PETER
Please don't use "top-posting"
(http://en.wikipedia.org/wiki/Top-posting) when someone has already
replied in "inline-posting" style. It is rather rude..(people using
mobile phones etc. are forgiven however)
The breakpoint shows that *some instance* of that bean has been invoked.
Are you quite sure that it really is the instance that is in the
conversation? Have a look at the stack-trace when your breakpoint is
triggered; does it show any Orchestra classes in the stack? Which ones?
Please also show the relevant spring configuration. You say for example
that your bean is "detailBean" but the access-conversation that got
destroyed was called "assetDetailController"....
Regards,
Simon