Uploaded image for project: 'WildFly Naming Client'
  1. WildFly Naming Client
  2. WFNC-24

Infinite recursion possible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • None
    • None
    • Hide

      Remove "java.naming.factory.url.pkgs" (Context.URL_PKG_PREFIXES) from the initial context environment properties. Instead provide a "java.naming.factory.initial" (Context.INITIAL_CONTEXT_FACTORY) of "org.wildfly.naming.client.WildFlyInitialContextFactory".

      Show
      Remove "java.naming.factory.url.pkgs" (Context.URL_PKG_PREFIXES) from the initial context environment properties. Instead provide a "java.naming.factory.initial" (Context.INITIAL_CONTEXT_FACTORY) of "org.wildfly.naming.client.WildFlyInitialContextFactory".

      It is possible to create an initial context environment such that any naming operation will recurse infinitely.

      The problem arises when legacy package prefixes are mixed in. The WildFlyRootContext does not find a scheme that matches the package prefix, and falls back to the JNDI naming manager. This locates the compatibility provider for ejb, which then auto-maps itself to the WildFlyInitialContext, which returns a WildFlyRootContext for the operation, causing the whole cycle to repeat again.

              Unassigned Unassigned
              dlloyd@redhat.com David Lloyd
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: