1 Reply Latest reply on Sep 6, 2007 5:04 AM by alesj

    NPE in Embedded Jboss when getCallerPrincipal method on Sess

    bjolletz

      I'm running tests using testNG and embedded Jboss. In the SLB which I am testing, I want to do the following:

      @Resource
      SessionContext ctx;
      
      public void foo() {
       ctx.isCallerInRole("someRole");
      }
      

      The isCallerInRole method, however, results in a NPE.

      There seems to be a post about this in JIRA:
      http://jira.jboss.org/jira/browse/EJBTHREE-615

      However, Carlo de Wolf says in the last post in this thread that "EJB 3 embedded is no longer supported.". What does this mean, isn't this bug going to be fixed?

      Is there any other way to get hold of the caller's roles? If not, I don't know what to do since I really need to check the caller's role in my SLBs.

      This must be a major problem, so I guess I'm not alone on this one?

      Any help on this would be greatly appreciated!

      /Daniel[/url]