logger.debug("isOk:" + isOk + " for " + componentModelClassName);
if(isOk)
{
if(logger.isDebugEnabled())
logger.debug("Calling prepare on '" + componentModelClassName + "'");
ComponentModel componentModel = (ComponentModel)c.newInstance();
componentModel.prepare(componentString, templateController, component.getModel());
}
}
catch (Exception e)
{
logger.error("Failed loading custom class from asset JAR. Trying normal class loader. Error:" + e.getMessage());
ComponentModel componentModel = (ComponentModel)Thread.currentThread().getContextClassLoader().loadClass(componentModelClassName).newInstance();
componentModel.prepare(componentString, templateController, component.getModel());
}
}
else
{
ComponentModel componentModel = (ComponentModel)Thread.currentThread().getContextClassLoader().loadClass(componentModelClassName).newInstance();
componentModel.prepare(componentString, templateController, component.getModel());
}
if(logger.isDebugEnabled())
t.printElapsedTime("Invoking custome class took");
}
catch (Exception e)