I have to understand the differences between the VFS CL and the UCL.
For the DynamicLoginConfig to work as part of the deployments such as EARs, they should not be loading a resource file called as "login-config.xml" as that defaults to conf/login-config.xml and that the resource file should in the class path of the VFS CL such as EAR->war->web-inf/classes
Use a unique prefix for the resource so that is only found in the ear, and update the mbean AuthConfig attribute value:
<mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="jboss.security.tests:service=SecuritySpecLoginConfig"> <attribute name="AuthConfig">secured-ejb/login-config.xml</attribute> <depends optional-attribute-name="LoginConfigService"> jboss.security:service=XMLLoginConfig </depends> <depends optional-attribute-name="SecurityManagerService"> jboss.security:service=JaasSecurityManager </depends> </mbean>
The jca-securedejb.jar would have to be updated to include the secured-ejb/login-config.xml resource rather than having login-config.xml at the root of the jar.
I know the tcl was not loading from say META-INF/login-config.xml when the tcl was set at the root of the ear. I guess this will be fixed with the tcl getResource as part of the 2.0.0.Beta4 of mc?
I don't think the ear is being added to the deployment tcl right now, so that is why its not picking up such a resource.