Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5048

Lookup of resource bound via ExternalContext using a CompondName results in serialization of org.jnp.interfaces.FastNamingProperties

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • No Release
    • JBossAS-4.0.5.GA
    • Naming
    • 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.

              starksm64 Scott Stark (Inactive)
              rhn-support-miclark Mike Clark
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: