After stepping through a bit more carefully...
The EJB is successfully accessed in:
Then LoginModule calls commit().
Which calls super.commit() - which calls getRoleSets() - which on an EJB call inside the getRoleSets() goes back to getUsersPassword() which then loops on itself, over and over, and then finally fails.
Its always a little tricky. Ejb's if they are secured, then to call them you should first be jaas logged in...But if you call the ejb from a Login Module, without being logged in, you go into an indefinite loop...Its like a re-entrant call with ejb's...Situation is different if you have @PermitAll...technically it should let you through
The EJB I'm calling is set to @PermitAll
It appears to be on the second call to the EJB, it's very odd, but I'm desperate for a solution.
First ensure that your EJBs are working with the default JAAS configuration of "other". Then bring in your login modules.