* This method initializes AuditManager which load audit modules and
* audit enabled flag
*/
public void loadAuditModules() {
try {
SecurityService securityBean = serverContext.getDefaultHabitat().getComponent(SecurityService.class);
/*V3:Commented
ConfigContext configContext =
ApplicationServer.getServerContext().getConfigContext();
assert(configContext != null);
Server configBean = ServerBeansFactory.getServerBean(configContext);
assert(configBean != null);
SecurityService securityBean =
ServerBeansFactory.getSecurityServiceBean(configContext);*/
assert(securityBean != null);
// @todo will be removed to incorporate the new structure.
//v3:Commented boolean auditFlag = securityBean.isAuditEnabled();
boolean auditFlag = Boolean.parseBoolean(securityBean.getAuditEnabled());
setAuditOn(auditFlag);
/*V3:Commented
com.sun.enterprise.config.serverbeans.AuditModule[] am =
securityBean.getAuditModule();*/
List<com.sun.enterprise.config.serverbeans.AuditModule> am = securityBean.getAuditModule();
for (com.sun.enterprise.config.serverbeans.AuditModule it: am) {
//V3:Commented for (int i = 0; i < am.length; i++){
try {
//V3:Commented String name = am[i].getName();
//V3:Commented String classname = am[i].getClassname();