I have a strange problem that I cannot seem to crack.
I have a stand alone client connecting up against a JBoss on a Linux Suse machine. All local traffic.
he very first lookup through JNDI takes _ages_ (~2-3 mins) and afterwards it just blazes through with no issues.
Been trawling the forums and the wiki with a few hints. But none work for me - or I made a mistake (likely).
JBoss is a 4.2.0 started with -b 0.0.0.0 and also the -Djava.net.preferIPv4Stack=true switch.
My client uses the following jndi.properties content:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://127.0.0.1:1099
java.naming.factory.url.pkgs=org.jnp.interfaces
So when I try to telnet to the port I get:
webserver:/srv/jboss/bin # telnet 127.0.0.1 1099
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
??srjava.rmi.MarshalledObject|????IhashlocBytest[BobjBytesq~xpr?ur[B??T?xp'??thttp://webserver:8083/q~q~uq~??sr org.jnp.server.NamingServer_Stubxrjava.rmi.server.RemoteStub????xrjava.rmi.server.RemoteObject???
a3xpw4
UnicastRef2 webserverJ???V?#!???xConnection closed by foreign host.
So fine - it uses "webserver" as its name. Above call is instant BTW, so server running and all works fine on that end.
Looking in my hosts file I have amongst other entries):
127.0.0.1 localhost webserver
Accessing via servlets works fine. No issues there.
Been trying various combinations of the above, but no luck until now.
Both client and server is running using jvm 1.6.0
Any help or clues from anyone?
Thanks a lot