// override to implement versioning logic
protected void attemptStartPA(String contextName, String contextPath, FileSystemHelper warStruct,
ClassLoader paClassLoader, int paType, long checksum, boolean silent)
throws RegistryException
{
PortletApplicationWar paWar = null;
try
{
paWar = new PortletApplicationWar(warStruct, contextName, contextPath, checksum, this.descriptorService);
try
{
if (paClassLoader == null)
{
paClassLoader = paWar.createClassloader(getClass().getClassLoader());
}
}
catch (IOException e)
{
String msg = "Invalid PA WAR for " + contextName;
if (!silent || log.isDebugEnabled())
{
log.error(msg, e);
}
if ( paClassLoader == null )
{
// nothing to be done about it anymore: this pa is beyond repair :(
throw new RegistryException(e);
}
//register = false;
}
PortletApplication regPA = null;
lockRegistry(RegistryLock.READ);
try
{
regPA = registry.getPortletApplication(contextName);
}
finally
{
unlockRegistry(RegistryLock.READ);
}
PortletApplication newPA = paWar.createPortletApp();
if (regPA == null)
{
System.out.println("**** New portlet app found - registration required..." + contextName);
regPA = registerPortletApplication(paWar, null, paType, paClassLoader, silent);
}