mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.3-BUG-FIX to HEAD
23175: Merged V3.3 to V3.3-BUG-FIX 23174: Fix ALF-5183: Audit configuration problems should not prevent server startup 23180: Added flag for strict audit config loading: audit.config.strict=false git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23187 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -78,6 +78,13 @@ import org.xml.sax.SAXParseException;
|
||||
*/
|
||||
public class AuditModelRegistryImpl extends AbstractPropertyBackedBean implements AuditModelRegistry
|
||||
{
|
||||
/** The name of the global enablement property. */
|
||||
public static final String PROPERTY_AUDIT_ENABLED = "audit.enabled";
|
||||
/** The name of the strict loading flag. */
|
||||
public static final String PROPERTY_AUDIT_CONFIG_STRICT = "audit.config.strict";
|
||||
/** The XSD classpath location. */
|
||||
private static final String AUDIT_SCHEMA_LOCATION = "classpath:alfresco/audit/alfresco-audit-3.2.xsd";
|
||||
|
||||
private static final Log logger = LogFactory.getLog(AuditModelRegistryImpl.class);
|
||||
|
||||
private String[] searchPath;
|
||||
@@ -383,7 +390,15 @@ public class AuditModelRegistryImpl extends AbstractPropertyBackedBean implement
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
throw new AuditModelException("Failed to load audit model: " + auditModelUrl, e);
|
||||
String strictPropStr = getProperty(AuditModelRegistryImpl.PROPERTY_AUDIT_CONFIG_STRICT);
|
||||
if (Boolean.parseBoolean(strictPropStr))
|
||||
{
|
||||
throw new AuditModelException("Failed to load audit model: " + auditModelUrl, e);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.error("Failed to load audit model: " + auditModelUrl, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
// NOTE: If we support other types of loading, then that will have to go here, too
|
||||
|
Reference in New Issue
Block a user