When a name is not in JDNI you will get a name not found exception.
This looks like the client is waiting for a response from the server. It could be that the server hung - do you see and exceptions in the server's log?
Another possibility is that your JNDI properties are incorrect and you are connection to some other service (not to JNDI on JBoss AS - port 1099 by default).
I am trying to lookup a connection factory using JBoss 4.3/ JBoss Messaging.
Show us the application code which you are trying.
It's a simple Context.lookup("name");