// instance if it's being removed. Also, if the session is null (after having been invalidated
// by the user), don't recreate it.
//
if ( request.getAttribute( REMOVING_PAGEFLOW_ATTR ) != this && request.getSession( false ) != null )
{
StorageHandler sh = Handlers.get( getServletContext() ).getStorageHandler();
HttpServletRequest unwrappedRequest = PageFlowUtils.unwrapMultipart( request );
RequestContext rc = new RequestContext( unwrappedRequest, null );
//
// If this is a long-lived page flow, there are two attributes to deal with.
//
if ( isLongLived() )
{
String longLivedAttrName = InternalUtils.getLongLivedFlowAttr( getModulePath() );
longLivedAttrName = ScopedServletUtils.getScopedSessionAttrName( longLivedAttrName, unwrappedRequest );
String currentLongLivedAttrName =
ScopedServletUtils.getScopedSessionAttrName( CURRENT_LONGLIVED_ATTR, unwrappedRequest );
sh.ensureFailover( rc, longLivedAttrName, this );
sh.ensureFailover( rc, currentLongLivedAttrName, getModulePath() );
}
else
{
String attrName = ScopedServletUtils.getScopedSessionAttrName( CURRENT_JPF_ATTR, unwrappedRequest );
sh.ensureFailover( rc, attrName, this );
}
}
}