4 Replies Latest reply on May 7, 2008 11:22 AM by aloubyansky

    Add schema binding to SingletonSchemaResolverFactory

    sguilhen

      I am about to commit the implementation of a metadata factory for security policies. This factory allows for the declaration of policies in -beans.xml files using security tags:

      <deployment xmlns="urn:jboss:bean-deployer:2.0">
      
       <application-policy xmlns="urn:jboss:security-beans:1.0" name="TestPolicy1">
       <authentication>
       <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
       <module-option name="usersProperties">jboss-users.properties</module-option>
       <module-option name="rolesProperties">jboss-roles.properties</module-option>
       </login-module>
       </authentication>
       </application-policy>
      
       .....
      </deployment>
      


      the AppPolicyBean generated by the factory registers the application policy described with the security layer.

      What I need is to add a definitive binding for the security schema to the SingletonSchemaResolverFactory for the policies to be used in the AS. In my tests I'm doing that explicitly during the setUp method:

       SingletonSchemaResolverFactory.getInstance().addJaxbSchema("urn:jboss:security-beans:1.0",
       "org.jboss.security.microcontainer.beans.metadata.SecurityPolicyMetaData");
      


      Is it ok if I add myself this binding and commit it?