I had similar issue on Jboss 5.1.0GA and I discovered that Jboss 5.1.0GA is registering JNDI service to ip address rather then 0.0.0.0 and that's why localhost lookup doesn't work. If you change it to hnp://0.0.0.0:1099 it should work.
$ netstat -tnlp|grep 1299
tcp 0 0 172.17.16.31:1299 0.0.0.0:* LISTEN 24545/java
I wish it had been like that :-]
It is vey much different in AS 7.x, but I have to say much has improved, and especially for the administrator of the server.
With the configuration, for example, all is in one place, it's far easier to see what is being constructed in your server and just exactly what you can
keep and cut out with the many sample configuration files.
The JNDI port is no more. Instead, the remoting port (default 4447) handles (amongst other things) remote access to an exported partition of the JNDI registry (java:jboss/exported/...). You can choose which interface(s) you want to bind that port to, and it is secured by default.
Miroslav Novak discusses the client classpath and JNDI environment requirements in this thread
Now Remote JNDI is implemented into JBoss As7 ? or by which version it will be available ?
It's already available in 7.1.x. See these artciles
Now I am getting error : "javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.lms.ear.manage.war:main" from Service Module Loader"
Could you describe in detail your environment, what you call and when the error happen?
Like Wolf says, please provide more details. But please do that in a new thread.