DefaultLifecycleProviderFactory.getLifecycleProviderFactory().getLifecycleProvider(externalContext);
// print out a very prominent log message if the project stage is != Production
if (!facesContext.isProjectStage(ProjectStage.Production))
{
ProjectStage projectStage = FacesContext.getCurrentInstance().getApplication().getProjectStage();
StringBuilder message = new StringBuilder("\n\n");
message.append("*******************************************************************\n");
message.append("*** WARNING: Apache MyFaces-2 is running in ");
message.append(projectStage.name().toUpperCase());
message.append(" mode.");
int length = projectStage.name().length();
for (int i = 0; i < 11 - length; i++)
{
message.append(" ");
}
message.append(" ***\n");