2 Replies Latest reply on Mar 5, 2012 5:58 AM by Sebastian Raue

    @RunAs/@RunAsPrincipal or new login from ejb?

    Sebastian Raue Newbie

      Is there a way to change the principal and roles programmatical instead of using @RunAs and @RunAsPrincipal?


      I have some MDB's which receive object messages which contain the principal and the roles of the ejb (session) which

      has send the respective message. The respective MDB has to call ejbs with the principal and roles taken from the message.


      Is there a way to do this?


      And a second question: We use custom principals created by our custom login module.

                                         When I use @RunAsPrincipal I get a RunAsIdentity when I

                                         call sessionContext.getCallerPrincipal(). Is there a way to

                                         intercept the creation of the principal to create our custom one instead?