I have to lookup an EJB deployed in JBoss(or any app server) in a remote machine.In the client side (stand alone) I am validating the user using jaas with my custom loginmodule(it just queries from the database).Is there a way to get the subject calling the EJB (or atleast the user name) from inside the remote ejb or else how can i pass the identity (username) of the user calling the bean to the remote ejb? If I use sessionContext.getCallerPrincipal().getName() its giving me anonymous.
Any help will be greatly appreciated..
posted 7 years ago
What's the issue? Is should be remote propagated on the EJB call if you are using JAAS?
Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1