Is your client running in the same JVM as JBoss? If yes, then you will be able to access the java:// namespace.
Global namespace is available to clients outside the JVM.
Is this the case?
I am assuming that your client is a remote client.
Remote clients can only lookup items in the global namespace not in the java: namespace.
Which version of JBoss are you using?