1 Reply Latest reply on Feb 11, 2004 11:10 AM by Scott Stark

    When does EJBContext callerPrincipal get set and cleared?


      When does the caller prinicipal get cleared and set?

      We have had a problem migrating to JBoss 3.2.2 where EJBContext.getCallerPrincipal() throws an IllegalStateException. It worked in 3.2.1, but seems that the EJBContext gets invalidated in 3.2.2 outside some execution scope.

      We are caching an EJBContext in ThreadLocal storage, then pulling it out during our SecurityProxy handling (we wrote a custom SecurityProxy which is only invoked when there is a callerPrincipal). We then clear the cached EJBContext when the Transaction ends so that we don't get another user's data the next time a new Tx executes in that thread.

      thanks all,