sd2.setDomainName("java:/jaas/domain2");
sda2.addAttachment(SecurityDeployment.class, sd2);
ps.addDeployment(secCtx2);
// Process the deployments to build the ManagedObjects
ps.process();
// Validate the deployment1 ManagedObjects
ManagedDeployment mo1 = ps.getManagedDeployment("deployment1");
validateDeployment1(mo1, ps);