users@glassfish.java.net

Re: "Security context" not propagated to Interceptors?

From: <glassfish_at_javadesktop.org>
Date: Sun, 16 Nov 2008 10:19:40 PST

Hi. Good to hear from someone, monologue is boring ;-)
I tried two approaches:
* I checked the "Default Principal To Role Mapping", so that I don't have to do the mapping myself in the sun-xxx.xml files
* I unchecked this setting, and provided sun-application.xml file in the EAR, as I am packaging the application in ear and deploy it using this (well, mainly I invoke the application from eclipse, using the TestEAR project, but I also double checked and deploying the application outside of eclipse)

I don't think mapping roles to users is a problem, if you've read the whole topic, you must have seen that sometimes it works correctly, sometimes it doesn't.
Of course, I know little of this, so I may be wrong, but then again - it does work most of the time, just not when a servelt invokes an ejb that has an interceptor.
To make sure, just download the source / build package from my most recent posts, the output generated by the servlet (mapped to /test) will tell you everything.

szczyp
[Message sent by forum member 'szczyp' (szczyp)]

http://forums.java.net/jive/thread.jspa?messageID=316997