0 Replies Latest reply on May 25, 2015 1:04 AM by boa-ig

    How to find out the IP address or host of the remote EJB3 client? wildfly-9.0.0.CR1, RemotingContext = false

    boa-ig

      I use wildfly-9.0.0.CR1

       

      public class HelloWorldBean implements HelloWorld {

          public HelloWorldBean() {

              try {

                  login();

              } catch (LoginException e) {

                  // TODO Auto-generated catch block

                  e.printStackTrace();

              }

      ................................................................

          public boolean login() throws LoginException {

              InetAddress remoteAddr = null;

              System.out.println("RemotingContext" );

              Connection connection = RemotingContext.getConnection();

              if (RemotingContext.isSet())

                  System.out.println("RemotingContext = true");

              else

                  System.out.println("RemotingContext = false");

      ................................................................

       

       

      wildfly  always gives false

       

       

      2015-05-25 08:16:46,609 INFO  [stdout] (EJB default - 1) RemotingContext = false

       

       

      please tell me what I'm doing wrong?