}, 1, 10000);
}
boolean attemptStart(ServletContext context, String contextName, String contextPath, String paDir, ClassLoader paClassLoader)
{
JetspeedLogger jsLogger = JetspeedLoggerUtil.getSharedLogger(getClass());
try
{
jsLogger.info(TRY_START_MSG + contextPath);
context.log(TRY_START_MSG + contextPath);
PortletServices services = JetspeedPortletServices.getSingleton();
if (services != null)
{
PortletApplicationManagement pam =
(PortletApplicationManagement)services.getService("PAM");
if (pam != null && pam.isStarted())
{
DirectoryHelper paDirHelper = new DirectoryHelper(new File(paDir));
pam.startPortletApplication(contextName, contextPath, paDirHelper, paClassLoader);
started = true;
psm = (PortalSessionsManager)services.getService(PortalSessionsManager.SERVICE_NAME);
jsLogger.info(STARTED_MSG + contextPath);
context.log(STARTED_MSG + contextPath);
return true;
}
}
}
catch (Exception e)
{
jsLogger.error(INIT_FAILED_MSG + contextPath, e);
context.log(INIT_FAILED_MSG + contextPath, e);
return true; // don't try again
}
return false;
}