Re: Access the SecurityContext in Rest Service using a Junit test

2014-11-06 Thread Ulrich Metzger
I get an org.apache.openejb.rest.ThreadLocalSecurityContext in the UserService, but with an empty UserPrincipal. I found out, that the ApplicationComposer calls the ThreadLocalContextManager which creates an empty ThreadLocalSecurityContext instance. So the question is where to hook in to replace

Re: Access the SecurityContext in Rest Service using a Junit test

2014-11-06 Thread Romain Manni-Bucau
Hi You mean you get null? Normally nothing special is needed Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-11-06 17:35 GMT+00:00 Ulrich Metzger : > Hi list, > does anybody know how to mock a SecurityContext which g

Access the SecurityContext in Rest Service using a Junit test

2014-11-06 Thread Ulrich Metzger
Hi list, does anybody know how to mock a SecurityContext which gets injected in a Service Class exposed as Rest service in a junit test? Here is the Service Class (the get method checks the currently logged in user): # ... @Path("/user") @Produces(MediaType.APPLICATION_JSON) @S

Re: maven help -> checkstyle and pmd trigger without copying rules around the project

2014-11-06 Thread Romain Manni-Bucau
Hi if the config is in (inlined I mean) no need of files so it works smoothly Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-11-06 10:52 GMT+00:00 Thiago Veronezi : > Guys, > > Do you know of any maven trick to tri

maven help -> checkstyle and pmd trigger without copying rules around the project

2014-11-06 Thread Thiago Veronezi
Guys, Do you know of any maven trick to trigger the "checkstyle:check" and "pmd:check" goals from any submodule without copying pmd or checkstyle configuration rules in every one of the target submodules? I mean, I want to be able to go to "/home/tveronezi/dev/ws/tomee/source/container/openejb-co