title: Wildfly Remote EJB Invocation
body: <p>I am trying to invoke a stateless EJB, deployed on a remote server. I can invoke the bean from my local JBoss environment but when I change the <code>remote.connection.default.host</code> to the remote machine's host, my client code does not work.</p>
  
  <p>This is my <code>jboss-ejb-client.properties</code>:</p>
  
  <pre class="lang-none prettyprint-override"><code>endpoint.name=client-endpoint
  
  remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
  
  remote.connections=default
  
  remote.connection.default.host=SERVERIP/HOSTNAME
  remote.connection.default.port=8080
  remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
  remote.connection.default.username=username
  remote.connection.default.password=Password
  </code></pre>
  
  <p>And my client code looks like this:</p>
  
  <pre><code>Properties properties = new Properties();
  properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
  String jndi = "jndi_name";
  Context context = new InitialContext(properties);
  obj = context.lookup(jndi);
  </code></pre>
  
  <p>Please help.</p>
  
  <p>Thanks all.
  Jack.</p>