this.securityDomain = secDomain;
}
public AuditContext getAuditContext() throws PrivilegedActionException
{
AuditContext ac = (AuditContext)contexts.get(securityDomain);
if(ac == null)
{
ac = new JBossAuditContext(securityDomain);
ApplicationPolicy ap = SecurityConfiguration.getApplicationPolicy(securityDomain);
if(ap != null)
{
AuditInfo ai = ap.getAuditInfo();
if(ai != null)
{
AuditProviderEntry[] apeArr = ai.getAuditProviderEntry();
List<AuditProviderEntry> list = Arrays.asList(apeArr);
for(AuditProviderEntry ape:list)
{
String pname = ape.getName();
try
{
ac.addProvider((AuditProvider) SecurityActions.loadClass(pname).newInstance());
}
catch (Exception e)
{
throw new RuntimeException(e);
}