-
Bug
-
Resolution: Obsolete
-
Major
-
JBossAS-4.0.5.GA
-
None
When a user registers resources using the org.jboss.naming.ExternalContext, they can only successfully lookup resources on the remote JNDI system if they first lookup the Context registered in the ExternalContext and then look up resources on the returned Context. Looking up the full name results in the use of the org.jnp.interfaces.FastNamingProperties class which is not generally available on the remote JNDI implementation.
So, for example, a user might register "external/foreign_jndi" using the ExternalContext. Looking up resource, a/b/c as follows works:
Context initialContext = new InitialContext();
Context remoteContext = (Context) initialContext.lookup("external/foreign_jndi");
Object obj = remoteContext.lookup("a/b/c");
while, the more direct
Context initialContext = new InitialContext();
Object obj = initialContext.lookup("external/foreign_jndi/a/b/c");
results in a "java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties" exception on the remote JNDI system.
It appears to occur because the FastNamingProperties class is used in the construction of the CompoundName in the org.jnp.interfaces.NamingParser. So, in the first case, the parsing of "a/b/c" is handled by the foreign JNDI system, while in the latter, the CompoundName containing the FastNamingProperties is passed to the foreign JNDI system.
- relates to
-
JBPAPP-516 Lookup of resource bound via ExternalContext using a CompondName results in serialization of org.jnp.interfaces.FastNamingProperties
-
- Closed
-