3 Replies Latest reply on Jan 9, 2007 11:10 PM by teknomad

    What is the deployment descriptor alternative to @SecurityDo

      Hi

      The JBoss server.log indicates the following, if @SecurityDomain is not present for SomeBean:

      org.jboss.ejb3.security.JaccHelper] SomeBean has no @SecurityDomain - skipping JACC configuration

      I would like the JACC configuration to be performed, but do not wish to use the @SecurityDomain annotation directly in the code. As is usual with EJB annotations, is there a deployment descriptor alternative to using the @SecurityDomain annotation?

      JBoss 4.0.4.GA is the version currently being used.

      Thanks

        • 1. Re: What is the deployment descriptor alternative to @Securi
          wolfgangknauf

          Hi !

          Use jboss.xml with this content:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
          
          <jboss>
           <security-domain>mysecuritydomain</security-domain>
          </jboss>


          Hope this helps

          Wolfgang

          • 2. Re: What is the deployment descriptor alternative to @Securi

            Thank you for the reply.

            Setting the security-domain tag as suggested, puts all the beans in the same security domain rather than just SomeBean (i.e. on in particular bean). And just as an FYI, I did find out that placing a container configuration in the jboss.xml is supposed to allow the selection of a particular bean, when that bean refers to the configuration by name. But at least in my configuration of JBoss 4.0.4.GA, this also fails, because it still acts as though every bean is under the security domain as well. Finally, placing the container configuration in standardjboss.xml, and referencing it by name from the jboss.xml, does finally work...a bit of a rigmarole, but it works.

            Thanks again.

            • 3. Re: What is the deployment descriptor alternative to @Securi

              I should have mentioned in my previous posting, that a particular bean does get put into a chosen SecurityDomain, but the JACC configuration is still skipped. Looking at the JBoss source code for JBoss-4.0.4.GA, seems to indicate that the code is actually looking for the SecurityDomain annotation itself, thus tying it to annotations. This makes me suspect that it may not be possible at all...but I have not dug further.