Thanks, but that doesn't answer my question. That tutorial lets GlassFish take care of the whole login, and that's not what I want. I explicitly want to let my own code take care of logging in.
But maybe that is simply impossible (though I find that hard to believe). An alternative question would be, how do I get the roles from the subject, i.e. where is my subject stored, so I can at least do authorization from my own code.
The code below is trying to get those roles and store them in a variable, so that later on some other code can read those.
[Message sent by forum member 'lvdpal' (lvdpal)]
http://forums.java.net/jive/thread.jspa?messageID=339600