title: JBoss EAP on Eclipse does not have jndi service
body: <p>I was trying to follow some EJB tutorial, most of them started talking about JNDI, and I am having trouble to get the service running on the JBOSS AS.</p>
  
  <p>I have tried both the community and EAP version of JBoss in Eclipse, but both fails.</p>
  
  <p>So now whenever I run lines like <code>BeanRemote beanRemote = (BeanRemote) context.lookup("somecontext");</code> it throws these error.</p>
  
  <pre><code>javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
  Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
  Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
  Caused by: java.net.ConnectException: Connection refused: connect
  </code></pre>
  
  <p>well of course it is caused by the port not opened, but I think its because the Jboss server is not providing the service, although its web port and admin port 8080 and 9990 is working fine.</p>
  
  <p>I am using eclipse Oxygen 4.7.0, I have downloaded the Red Hat JBoss developer Studio. I added the server via the "New Server" wizard, then downloaded the server runtimes within the wizard. However there just seems no way to configure jndi, nor can I find any file that is related to jndi or jnp in the downloaded path. The XML configuration showed that only Management 9990 and Web 8080 port is open.</p>
  
  <p>I don't understand why is this not enabled by default, and I don't know what to do. Is JNDI configurable somewhere in the management console? please help</p>