We are having an issue in our application whereby we have a request
filter that calls PageFlowUtils.getCurrentPageFlow( HttpServletRequest
request, ServletContext servletContext ). Sometimes(but not always)
this is returning null even though the filter is running for the request
after the begin() method is called on our Controller. Here's the
sequence of events:
1) Controller's begin() method is called
2) begin() forwards to another action with redirect = true
3) request filter fires
Now, at the point the request filter fires for the request corresponding
to the next action the DeferredSessionStorageHandler may not have yet
applied its changes so _netui:curPageFlow isn't yet committed to the
session and this causes PageFlowUtils.getCurrentPageFlow to return null.
This usually only happens the first time I try to run the flow. Even if
I close my browser and make sure I get a new session, the following
attempts all seem to work just fine. I'm not sure what it is about the
first run that seems to make things fail. Here's the relevant log
information:
2007-06-27 14:22:01,000|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.PageFlowRequestProcessor|------------
------------------- Start Request #1 -----------------------------------
2007-06-27 14:22:01,078|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.DefaultPageFlowEventReporter|beginAct
ionRequest:
Request=org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrappe
[EMAIL PROTECTED], [EMAIL PROTECTED]
2007-06-27 14:22:01,156|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.PageFlowRequestProcessor|Got request
for /csm/dispatcher/Controller.jpf, forwarding to /dispatcher/begin.do
2007-06-27 14:22:01,187|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:nestingStack
2007-06-27 14:22:01,187|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.PageFlowRequestProcessor|------------
------------------- Start Request #2 -----------------------------------
2007-06-27 14:22:01,187|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.DefaultPageFlowEventReporter|beginAct
ionRequest:
Request=org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrappe
[EMAIL PROTECTED], [EMAIL PROTECTED]
2007-06-27 14:22:01,187|INFO |csm |Thread-16
|org.apache.beehive.netui.pageflow.PageFlowRequestProcessor|Attempting
to instantiate SharedFlowControllers for request
/csm/dispatcher/begin.do
2007-06-27 14:22:01,187|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:sharedFlow:global.Global
2007-06-27 14:22:01,187|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:sharedFlow:global.Global
2007-06-27 14:22:01,203|INFO |csm |Thread-16
|org.apache.beehive.netui.pageflow.FlowControllerFactory|No Global.app
was found in /csm
2007-06-27 14:22:01,234|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:sharedFlow:global.Global
2007-06-27 14:22:01,234|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:curLongLivedModule
2007-06-27 14:22:01,234|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:curPageFlow
2007-06-27 14:22:01,234|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:nestingStack
2007-06-27 14:22:01,234|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.FlowControllerFactory|Creating
PageFlowController of type dispatcher.Controller
2007-06-27 14:22:01,484|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.JavaControlUtils|No control
field annotations were found for [EMAIL PROTECTED]
2007-06-27 14:22:01,515|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:PageFlowControlContainerInstance
2007-06-27 14:22:01,546|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|setAttribute:
_netui:PageFlowControlContainerInstance=org.apache.beehive.netui.pageflo
[EMAIL PROTECTED]
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:PageFlowControlContainerInstance
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.DefaultPageFlowEventReporter|flowCont
rollerCreated: [EMAIL PROTECTED],
Request=org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrappe
[EMAIL PROTECTED], [EMAIL PROTECTED]
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:curLongLivedModule
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:curPageFlow
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:curLongLivedModule
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:curPageFlow
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|setAttribute: _netui:[EMAIL PROTECTED]
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|removeAttribute: _netui:curLongLivedModule
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:curLongLivedModule
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:curPageFlow
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|removeAttribute: _netui:facesBacking
2007-06-27 14:22:01,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:facesBacking
2007-06-27 14:22:01,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.PageFlowRequestProcessor|Populating
bean properties from this request
2007-06-27 14:22:02,046|DEBUG|csm |Thread-16
|org.apache.beehive.netui.script.common.ImplicitObjectUtil|using form of
type: org.apache.beehive.netui.pageflow.internal.AnyBeanActionForm
2007-06-27 14:22:02,421|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|getAttribute: _netui:PageFlowControlContainerInstance
2007-06-27 14:22:02,421|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.DefaultPageFlowEventReporter|actionRa
ised: [EMAIL PROTECTED],
ActionMapping=[delegate to
ActionConfig[path=/begin,name=baseConfigBean,parameter=com.motive.commsf
low.arch.pageflow.ComponentPageFlowController,scope=request,type=org.apa
che.beehive.netui.pageflow.internal.FlowControllerAction],
ActionForm=[AnyBeanActionForm wrapper for
[EMAIL PROTECTED],
Request=org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrappe
[EMAIL PROTECTED], [EMAIL PROTECTED]
2007-06-27 14:22:02,562|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.FlowController|Invoking action method
begin(com.motive.commsflow.arch.component.BaseConfigBean)
2007-06-27 14:22:02,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DefaultActionForwardHandler|
Redirecting to /start.do
2007-06-27 14:22:02,625|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.DefaultPageFlowEventReporter|actionSu
ccess: [EMAIL PROTECTED],
ActionMapping=[delegate to
ActionConfig[path=/begin,name=baseConfigBean,parameter=com.motive.commsf
low.arch.pageflow.ComponentPageFlowController,scope=request,type=org.apa
che.beehive.netui.pageflow.internal.FlowControllerAction],
ActionForm=[AnyBeanActionForm wrapper for
[EMAIL PROTECTED],
Request=org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrappe
[EMAIL PROTECTED], [EMAIL PROTECTED],
ActionForward=ForwardConfig[name=start,path=/start.do,redirect=true,cont
extRelative=false], TimeTakenMillis=204
2007-06-27 14:22:02,640|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.PageFlowRequestProcessor|processForwa
rdConfig(ForwardConfig[name=start,path=/start.do,redirect=true,contextRe
lative=false])
2007-06-27 14:22:02,687|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.DefaultPageFlowEventReporter|endActio
nRequest:
Request=org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrappe
[EMAIL PROTECTED], [EMAIL PROTECTED],
TimeTakenMillis=1500
2007-06-27 14:22:02,687|DEBUG| |[ACTIVE]
ExecuteThread: '2' for queue: 'weblogic.kernel.Default
(self-tuning)'|com.motive.commsflow.arch.pageflow.ComponentRequestFilter
|Entering ComponentRequestFilter...
2007-06-27 14:22:02,687|DEBUG| |[ACTIVE]
ExecuteThread: '2' for queue: 'weblogic.kernel.Default
(self-tuning)'|org.apache.beehive.netui.pageflow.internal.DeferredSessio
nStorageHandler|getAttribute: _netui:curLongLivedModule
2007-06-27 14:22:02,687|DEBUG| |[ACTIVE]
ExecuteThread: '2' for queue: 'weblogic.kernel.Default
(self-tuning)'|org.apache.beehive.netui.pageflow.internal.DeferredSessio
nStorageHandler|getAttribute: _netui:curPageFlow
2007-06-27 14:22:02,687|DEBUG| |[ACTIVE]
ExecuteThread: '2' for queue: 'weblogic.kernel.Default
(self-tuning)'|com.motive.commsflow.arch.pageflow.ComponentRequestFilter
|componentController = null
2007-06-27 14:22:02,718|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.PageFlowRequestProcessor|------------
-------------------- End Request #2 ------------------------------------
2007-06-27 14:22:02,718|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|Applying changes for request /csm/dispatcher/Controller.jpf.
Identity: 3845217
2007-06-27 14:22:02,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.util.internal.ServletUtils|Using session lock
of type: class weblogic.servlet.internal.session.MemorySessionData
2007-06-27 14:22:02,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|Removing attribute _netui:facesBacking from the session.
2007-06-27 14:22:02,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|Removing attribute _netui:curLongLivedModule from the session.
2007-06-27 14:22:02,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|Committing attribute _netui:PageFlowControlContainerInstance to the
session.
2007-06-27 14:22:02,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|Committing attribute _netui:curPageFlow to the session.
2007-06-27 14:22:02,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|Ensure failover for attribute _netui:curPageFlow
2007-06-27 14:22:02,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.internal.DeferredSessionStorageHandle
r|Completed applying changes for request /csm/dispatcher/Controller.jpf.
Identity: 3845217
2007-06-27 14:22:02,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.DefaultPageFlowEventReporter|endActio
nRequest:
Request=org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrappe
[EMAIL PROTECTED], [EMAIL PROTECTED],
TimeTakenMillis=1687
2007-06-27 14:22:02,765|DEBUG|csm |Thread-16
|org.apache.beehive.netui.pageflow.PageFlowRequestProcessor|------------
-------------------- End Request #1 ------------------------------------
Should I log a bug, or am I doing something wrong? I haven't yet tried
to create a simple test case. I'm on WebLogic 9.2 MP1, BTW. If it is a
bug, is there any suggested work around? I'd like/need to keep my
redirect = true. Thanks,
Micah