I deploy an ear in an existing JBoss 4.2.0. I'd like to be able to deploy the application policy with my ear and without updating the conf/login-config.xml.
I have tried to use th DynamicLoginConfig MBean. I have two issues with it:
First I wrote a dynamic-service.xml file:
<server> <mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="jboss:service=DynamicLoginConfig"> <attribute name="AuthConfig">file:///D:/Projets/Demo/jboss-4.2.0.GA/server/default/deploy/ear-1.0-SNAPSHOT.ear/META-INF/login-config.xml</attribute> <!-- The service which supports dynamic processing of login-config.xml configurations. --> <depends optional-attribute-name="LoginConfigService"> jboss.security:service=XMLLoginConfig </depends> <!-- Optionally specify the security mgr service to use when this service is stopped to flush the auth caches of the domains registered by this service. --> <depends optional-attribute-name="SecurityManagerService"> jboss.security:service=JaasSecurityManager </depends> </mbean> </server>