[jboss-user] [JBoss Seam] - Re: how can I do optimistic locking with crud framework?
cja987
do-not-reply at jboss.com
Thu Oct 19 19:44:47 EDT 2006
It took much fighting with log4j.xml, but I got a debug log. The whole log is 1340 or so lines long, so I'll see what I can glean from it
When I click "Edit Contact", I do see it creating a conversation:
| 16:32:06,766 DEBUG [Manager] No stored conversation, or concurrent call to the stored conversation
| 16:32:06,776 DEBUG [AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(3)
| ...
| 16:32:06,876 INFO [ContactAction] Conversation begun by beginEdit()
| ...
| 16:32:07,066 DEBUG [Component] instantiating Seam component: conversation
| ...
| 16:32:07,066 DEBUG [Contexts] found in conversation context: contactHome
| ..
| 16:32:07,166 DEBUG [Manager] Discarding conversation state: 3
| 16:32:07,166 DEBUG [Events] Processing event:org.jboss.seam.preRemoveVariable.org.jboss.seam.core.manager.conversationId
| 16:32:07,166 DEBUG [Events] Processing event:org.jboss.seam.postRemoveVariable.org.jboss.seam.core.manager.conversationId
| 16:32:07,206 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 16:32:07,206 DEBUG [AbstractSeamPhaseListener] committing transaction after phase: RENDER_RESPONSE(6)
| 16:32:07,206 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 16:32:07,206 DEBUG [Lifecycle] After render response, destroying contexts
| 16:32:07,206 DEBUG [Lifecycle] destroying business process context
| 16:32:07,206 DEBUG [Events] Processing event:org.jboss.seam.preDestroyContext.BUSINESS_PROCESS
| 16:32:07,206 DEBUG [Events] Processing event:org.jboss.seam.postDestroyContext.BUSINESS_PROCESS
| 16:32:07,206 DEBUG [Lifecycle] destroying conversation context
| ...
| 16:32:07,327 DEBUG [Lifecycle] <<< End web request
|
And that's within the same request. That conversation shouldn't have been destroyed, should it?
Then when I click update:
| 16:32:41,999 DEBUG [Manager] No stored conversation, or concurrent call to the stored conversation
| 16:32:41,999 DEBUG [AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(4)
| ...
| 16:32:42,189 DEBUG [Manager] Storing conversation state: 4
| 16:32:42,189 DEBUG [Component] instantiating Seam component: conversation
| 16:32:42,189 DEBUG [Component] initializing new instance of: conversation
|
| 16:32:42,189 DEBUG [Events] Processing event:org.jboss.seam.postDestroyContext.EVENT
| 16:32:42,189 DEBUG [Lifecycle] <<< End web request
| 16:32:42,199 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 16:32:42,199 DEBUG [AbstractSeamPhaseListener] beginning transaction prior to phase: RESTORE_VIEW(1)
| 16:32:42,199 DEBUG [Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 16:32:42,199 DEBUG [Lifecycle] >>> Begin web request
| 16:32:42,199 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.manager
| 16:32:42,199 DEBUG [Component] initializing new instance of: org.jboss.seam.core.manager
| 16:32:42,199 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager
| 16:32:42,199 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager
| 16:32:42,199 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.manager
| 16:32:42,199 DEBUG [Manager] Found conversation id in request parameter: 4
| 16:32:42,199 DEBUG [Manager] Restoring conversation with id: 4
| 16:32:42,199 DEBUG [AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(4)
|
| ... and so on ...
|
So it does look like it's keeping the conversation across the redirect, but I can't figure out why it's destroying the first conversation.
I could post the whole log if you want.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979527#3979527
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979527
More information about the jboss-user
mailing list