1 Reply Latest reply on Jun 29, 2006 6:03 AM by Markus Schaefer

    Run-as-identity of MDB assigned to other threads

    Markus Schaefer Newbie

      JBoss Version: 4.0.3 SP1
      JDK: 1.4.1_01
      OS: WinXP Prof. SP2

      I have experienced a very strange behaviour of the JBoss AS with MDB run-as-roles:

      I have WebApplication (Struts-based) using stateless session beans in the business layer. I use a custom written JAAS-Login module (both client side and server side).

      This seems to work perfektly!

      Now I have added a MDB to perform background processing.
      The MDB uses a run-as role:

      <security-identity>
       <run-as>
       <role-name>MDB-Role</role-name>
       </run-as>
       </security-identity>


      Now, while the background-processing controled by the MDB is running,
      all user request also become associated with the run-as-role of the MDB and the contained security checks fail.
      Once the background-processing has terminated, everything works fine again.

      Does JBoss AS have a problem with the Thread-Assignment of the run-as-roles?
      Or what else could be wrong?