Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2263

@SecurityDomain doesn't work with @Singleton

    XMLWordPrintable

Details

    • 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
    • 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.

      Attachments

        Activity

          People

            jaikiran Jaikiran Pai (Inactive)
            t3chris Christian Reiter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: