Possible to access remote EJBs from a custom LoginModule?
问题 I found some nice hints on how to write a custom realm and loginModule. I'm wondering though if it is possible to access a remote EJB within the custom loginModule. In my case, I have remote EJBs that provide access to user-entities (via JPA) -- can I use them (e.g. via @EJB annotation)? 回答1: Ok, I found the answer myself: works fine! I can get a reference to the remote SLSB via an InitialContext. Here's the code: public class UserLoginModule extends AppservPasswordLoginModule { Logger log =