/*
* Add security association valve after the authorization valves so that the authenticated user may be associated
* with the request thread/session.
*/
SecurityAssociationValve valve = new SecurityAssociationValve(metaData, config.getSecurityManagerService());
valve.setSubjectAttributeName(config.getSubjectAttributeName());
server.invoke(objectName, "addValve", new Object[] { valve }, new String[] { "org.apache.catalina.Valve" });
/*
* TODO: Retrieve the state, and throw an exception in case of a failure Integer state = (Integer)
* server.getAttribute(objectName, "state"); if (state.intValue() != 1) { throw new DeploymentException("URL " +