0 Replies Latest reply on Jun 21, 2010 10:43 AM by alxs.alxs.gmx.de

    Running Tests with JBoss container security

    alxs.alxs.gmx.de

      Hi,


      in my Seam 2.2.0 project I have to use some legacy EJBs which are using EJB container security. Since Seam does not integrate with the EJB security context I'm using a filter as recommended in http://seamframework.org/Community/SeamAndSecurityContext. This works fine when running my application in an JBoss 4.2.3 server.


      However it does not work when I try to run integration tests that are accessing any legacy beans. The filter gets called but SecurityAssociation.setPrincipal(principal) doesn't seem to work since a SecurityAssociation.getPrincipal() returns null. I assume this is because the embedded JBoss container used for testing is newer than my JBoss 4.2.3 that I have to use.


      Is there any other way I can populate the current user into the security context?


      Regards,
      Alex