Annotating a JAX-RS web service class with @RunAs triggers a warning at deployment-time:
[#|2011-07-01T14:11:48.035+0200|WARNING|glassfish3.1|global|_ThreadID=21;_ThreadName=Thread-1;|The annotation symbol inheritance is not supported.
location: class test.Service1
I don't really know if this is the expected behaviour, as this warning does not appear with @DeclareRoles and @RolesAllowed annotations.
The maven project attached contains:
- An EJB exposed as JAXRS service.
- A web.xml descriptor, to load Jersey's ServletContainer on startup.
- A glassfish-ejb-jar.xml descriptor to map roles and define the run-as principal.