0 Replies Latest reply on May 7, 2012 11:48 PM by Etsuji Nakai

    Specifying a caller pricipal in remote EJB call from a server instance.

    Etsuji Nakai Newbie



      I checked what pricipal is used for the remote EJB call when following this article.




      And the result was just "anonymous".


      The following is the snippet of my EJB code.


      @Stateless(name = "GreetEJB")

      public class GreetingServiceBean implements GreetingServiceBusiness.Local,

              GreetingServiceBusiness.Remote {



          private SessionContext context;



          public String greet(String user) {

              System.out.println("Caller Principal " + context.getCallerPrincipal().getName());



      How can I specify a caller pricipal when calling remote EJB from a server instance?