I looked at the code and wrote my own login module from scratch (this is in JBoss 3.0.3), and didn't use getRoleSets. Basically, I was required to create a NestableGroup with the name "Roles", then add to it a SimpleGroup named "Roles" as well. To the simple group I added my SimplePrincipals with the appropriate role names. Not sure why it works that way, but it seems to work fine.
Here's an example:
SimpleGroup sg = new SimpleGroup("Roles");
NestableGroup ng = new NestableGroup("Roles");
Hope this helps.