1 Reply Latest reply on May 1, 2007 12:50 PM by adrian.brock

    Class loading import version range restrictions

    starksm64

      One thing I'm not seeing in the new class loading work is version range restrictions on the imports. Is this expected to be added as a type of ClassLoaderPolicy implementation?

        • 1. Re: Class loading import version range restrictions

          Version range restrictions are handled at a higher policy layer.

          e.g. com.acme.something:1.2.3 could be something like:
          repository/acme/something/1.2.3/something.jar

          The details are not relevant to the dumb classloader which is just told what to do
          i.e. in the example above:

          Pseudo-code:

          policy = new VFSClassLoaderPolicy("repository/acme/something/1.2.3/something.jar");
          policy.setExportedPackages("com.acme.something");
          


          Concurrently there could also be
          policy2 = new VFSClassLoaderPolicy("repository/acme/something/1.2.4/something.jar");
          policy2.setExportedPackages("com.acme.something");
          


          Which of these gets wired as your delegates/imports will be decided at the higher level.

          The higher level in our case will be the MainDeployer with a new classloading
          dependency implementation provided by the MC, defined by a jboss-classloader.xml
          (if it is not an osgi deployment).