1 Reply Latest reply on Dec 5, 2008 4:25 AM by drfranknfurter

    getting away from defining roles in ejb-jar.xml

    drfranknfurter

      Glassfish has the option to enable default role mapping. Which means if the role name assigned to the principal is the same as the the role name used in annotations or isCallerInRole you don't have to list all the roles in ejb-jar.xml or web.xml.

      Is there anything similar for JBoss?

        • 1. Re: getting away from defining roles in ejb-jar.xml
          drfranknfurter

          Mmmm... error caused by.... me!

          For the sake of others, here is what was wrong:

          I am using custom Group and Principal implementations. When the authorization check is done in the EJB container a SimplePrincipal object is passed to the isMember method of Group and not my custom Principal. The objects contained in the Group are custom Principals, thus care must be taken when comparison is done to not let the different classes get in the way. The name is what you care about.