Details

    • Steps to Reproduce:
      Hide
      • Create a Stateless and a Singleton Session Bean, both annotated with @SecurityDomain("MySecDomain")
      • Configure a corresponding security domain "MySecDomain" in login-config.xml
      • Create a method in each Session Bean and annotate it with @RolesAllowed("...")
      • Call both methods from a remote Java SE Client
      • It will work with the Stateless Bean and fail with the Singleton Session Bean
      Show
      Create a Stateless and a Singleton Session Bean, both annotated with @SecurityDomain("MySecDomain") Configure a corresponding security domain "MySecDomain" in login-config.xml Create a method in each Session Bean and annotate it with @RolesAllowed("...") Call both methods from a remote Java SE Client It will work with the Stateless Bean and fail with the Singleton Session Bean
    • Component Fix Version(s):
      jboss-ejb3-singleton:1.0.1

      Description

      In Jboss AS 6 (6.0.0.Final) the Annotation @SecurityDomain from the package org.jboss.ejb3.annotation.SecurityDomain doesn't seem to work with @Singleton - SessionBeans.

      If I try to call a method from a @Singleton which is marked with @RolesAllowed i get a "java.lang.IllegalStateException: Security Context has not been set" Exception. If I do completely the same with a @Stateless SessionBean everything works fine.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jaikiran Jaikiran Pai
                Reporter:
                t3chris Christian Reiter
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: