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

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

    enakai00

      Hi,

       

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

       

      https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance

       

      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 {

       

          @Resource

          private SessionContext context;

       

          @Override

          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?