[jboss-user] [JBoss Seam] - conversational bean not always redirecting to ifNotBegunOutc
knaas
do-not-reply at jboss.com
Tue Sep 12 15:21:57 EDT 2006
This is probably my misunderstanding of the phases and conversations, but here it goes....
We have a seam app with a lot of @Conversational beans. Many of these beans support wizards.
If a user is on the nth page of one of the wizards, and the server was just bounced, I would expect the "Next" button to automatically redirect them to the "ifNotBegunOutcome" of the class associated with the "Next" buttons action method. However, in most scenarios, it lets the "Next" go through and the user is shown a nonsense wizard page filled with blanks.
It appears that the problem has to do with the sequence of the the Conversational check and the instantiation of the components associated with the form post.
Conversational checks only occur in the INVOKE_APPLICATION phase. If the Conversational bean does not exist in the conversation scope, it will redirect to the ifNotBegunOutcome. However, during the APPLY_REQUEST_VALUES phase, the Conversational beans have already bean instantiated by the SeamVariableResolver.
For instance, in the log below, we are demonstrating what happens when we click the "Next" button on an action that uses the worksheetBean. I had just restarted the server (and thus the conversation was gone). Because the worksheetBean is instantiated by the SeamVariableResolver, the intended Conversational check never occurs.
What can we do about this?
| 2006-09-12 14:40:21,162 DEBUG [com.app.web.listener.LogPhaseListener] BEFORE: APPLY_REQUEST_VALUES(2)
| 2006-09-12 14:40:21,240 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3 at b5d935, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader at aacf63{ url=null ,addedOrder=0}
| 2006-09-12 14:40:21,240 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3 at b5d935, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader at 15772e{ url=null ,addedOrder=0}
| 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: userPrincipal
| 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: userPrincipal
| 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: userPrincipal
| 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: userPrincipal
| 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: applicationMessages
| 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.Component] instantiating Seam component: applicationMessages
| 2006-09-12 14:40:21,271 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-09-12 14:40:21,287 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3 at b5d935, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader at 1831292{ url=null ,addedOrder=0}
| 2006-09-12 14:40:21,287 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: worksheetBean
| 2006-09-12 14:40:21,287 DEBUG [org.jboss.seam.Component] instantiating Seam component: worksheetBean
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971106#3971106
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971106
More information about the jboss-user
mailing list