I installed custom principal in my own LoginModule which is my domain Entity, and it looks OK from the web layer.
BUT, when i call sessionContext.getCallerPrincipal() from my session bean, I get instance of SimplePrincipal which contains username only. I expected to get my own custom principal.
Is that expected behavior? Why don't I get the same result as from the web app? Is there anything I can do about this?