public static FactoryConfiguration getConfiguration(ServletContext application)
{
Object obj = application.getAttribute(CONFIGURATION_KEY);
if (obj instanceof FactoryConfiguration)
{
FactoryConfiguration injected = (FactoryConfiguration)obj;
// make note of where we found this
String source = injected.getSource();
String addnote = " from ServletContext.getAttribute("+CONFIGURATION_KEY+")";
if (!source.endsWith(addnote))
{
injected.setSource(source+addnote);
}
return injected;
}
return null;
}