in ti/phase2/jars/core/src/java/org/apache/ti/processor/chain/pageflow/ShowView.java [47:148]
public boolean execute(Context context) throws Exception {
// Callback to the container adapter.
ContainerAdapter containerAdapter = AdapterManager.getContainerAdapter();
PageFlowEventReporter er = containerAdapter.getEventReporter();
containerAdapter.beginRequest();
er.beginPageRequest();
long startTime = System.currentTimeMillis();
//
// Initialize the ControlBeanContext in the session.
//
JavaControlUtils.initializeControlContext();
//
// Register the default URLRewriter
//
URLRewriterService.registerURLRewriter( 0, new DefaultURLRewriter() );
PageFlowActionContext actionContext = PageFlowActionContext.get();
boolean isForwardedRequest = actionContext.isNestedRequest();
try
{
if ( ! actionContext.isStayInCurrentModule() ) {
// Ensure that the right module is selected, for use by the tags.
InternalUtils.selectModule( actionContext.getModuleConfig());
}
try
{
//
// Initialize shared flows for the current request.
//
FlowControllerFactory flowControllerFactory = FlowControllerFactory.get();
Map/*< String, SharedFlowController >*/ sharedFlows = flowControllerFactory.getSharedFlowsForRequest();
ImplicitObjectUtil.loadSharedFlow( sharedFlows );
//
// Make sure that the current PageFlowController is set up for this request.
//
PageFlowController curJpf;
if ( actionContext.isStayInCurrentModule() )
{
actionContext.setStayInCurrentModule( false );
curJpf = PageFlowUtils.getCurrentPageFlow();
}
else
{
curJpf = flowControllerFactory.getPageFlowForRequest();
}
if ( _log.isDebugEnabled() )
{
_log.debug( "Current PageFlowController is: " + curJpf );
_log.debug( "Continuing with filter chain..." );
}
runPage( curJpf);
}
catch ( ClassNotFoundException e )
{
throw new PageFlowException( e );
}
catch ( InstantiationException e )
{
throw new PageFlowException( e );
}
catch ( IllegalAccessException e )
{
throw new PageFlowException( e );
}
catch ( PageFlowException e )
{
throw new PageFlowException( e );
}
}
finally
{
//
// Clean up the ControlBeanContext in the session.
//
JavaControlUtils.uninitializeControlContext();
//
// Callback to the server adapter.
//
containerAdapter.endRequest();
long timeTaken = System.currentTimeMillis() - startTime;
er.endPageRequest(timeTaken );
//
// If this is not a forwarded request, then commit any session-scoped changes that were stored in the
// request.
//
if ( ! isForwardedRequest )
{
Handlers.get().getStorageHandler().applyChanges();
}
}
return false;
}