glassfish
  1. glassfish
  2. GLASSFISH-18564

Naming should use standard lookup names for injection

    Details

    • Type: Improvement Improvement
    • Status: In Progress
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: naming
    • Labels:
      None

      Description

      There is somewhere a disconnect between how naming works through proxies for lookup() of EJB TimerService or EJBContext (may be others) vs. falling back into v2-style code (ComponentEnvManagerImpl.EjbContextProxy) for injection of those types.

      The error might be on the DOL registration, so if it is please reassign.

      This is the callstack of the "wrong" sequence:

      at com.sun.ejb.EjbNamingReferenceManagerImpl.getEJBContextObject(EjbNamingReferenceManagerImpl.java:226)
      at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$EjbContextProxy.create(ComponentEnvManagerImpl.java:915)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:776)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:744)
      at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:169)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:500)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:457)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:614)

        Activity

        Hide
        Tom Mueller added a comment -

        Reassigning to component lead as the assignee is no longer with the project.

        Show
        Tom Mueller added a comment - Reassigning to component lead as the assignee is no longer with the project.
        Hide
        Cheng Fang added a comment -

        When looking up these well-known resources by their portable jndi names (e.g., java:comp/EJBContext, java:comp/TimerService, etc), the result is retrieved from the preloaded list of named naming proxies.

        When processing @Resource injections of these well-known resources, the reference name to look up is usually in the form java:comp/env/<full-class-name>/<field-name>, which follows a different path. I'll check if we can canonicalize the lookup name earlier.

        Show
        Cheng Fang added a comment - When looking up these well-known resources by their portable jndi names (e.g., java:comp/EJBContext, java:comp/TimerService, etc), the result is retrieved from the preloaded list of named naming proxies. When processing @Resource injections of these well-known resources, the reference name to look up is usually in the form java:comp/env/<full-class-name>/<field-name>, which follows a different path. I'll check if we can canonicalize the lookup name earlier.

          People

          • Assignee:
            guojun.shan
            Reporter:
            marina vatkina
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: