glassfish
  1. glassfish
  2. GLASSFISH-11764

EJBContainer#createEJBContainer() does not consider full classpath

    Details

      Description

      The contract for EJBContainer#createEJBContainer() says:

      "JVM classpath is searched for all ejb-jars or exploded ejb-jars in directory
      format."

      The "JVM classpath" in this documentation is presumably intended to be what the
      EJB 3.1 specification says:

      "By default, the embeddable container searches the JVM classpath (the value of
      the Java System property java.class.path) to find the set of EJB modules for
      initialization."

      That happens to be a really narrow version of what any given JVM classpath
      usually is in reality. A pragmatic definition of classpath also includes the
      set of all "reachable" classpath entries present in a jar file's MANIFEST.MF
      Class-Path entry.

      IMHO the classpath scanning mechanism in EJBContainer should take into account
      the full set of classpath entries (including those reachable from a Class-Path
      manifest header), not just the value in System.getProperty("java.class.path"),
      since that is what programmers expect.

      Finally, most Maven tests run by building up such a classpath in an otherwise
      empty "booter" jar file. Test cases that launch in this manner will not be able
      to discover EJBs on the classpath without manual intervention until this bug is
      fixed.

      The full discussion of this issue is available at
      http://forums.java.net/jive/thread.jspa?threadID=78213&start=0&tstart=0.

        Activity

        ljnelson created issue -
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 11764 43368
        Hong Zhang made changes -
        Fix Version/s future release [ 11148 ]
        Fix Version/s 3.2 [ 10969 ]
        prasads made changes -
        Tags 3_1-exclude 3_1-exclude javaee_ri_target

          People

          • Assignee:
            Hong Zhang
            Reporter:
            ljnelson
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated: