0 Replies Latest reply on Aug 17, 2007 10:07 AM by J-C jc

    DynamicLoginConfig configuration issue

    J-C jc Apprentice

      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>


      1- First issue is that I have de copy this file in the deploy directory. If I put it in the ear, MBean is not deployed. Is it possible to include the MBean configuration in an ear ?

      2- Second issue: I have to hardcode the url for the login-config.xml file. If I try with a relative path (as shown in the wiki) I got an error message because xml file does not exist. When the MBean contains an url relative, where is the root dir ?