Community

Wildcard support in Dynamic-imports

reply from Adrian Brock in JBoss Microcontainer Development - View the full discussion

Adrian Brock wrote:

You want the operation to go through the delegate to the other policy with whatever export/import restrictions apply.

 

   protected DelegateLoader resolve(String pckg)
   {
      Requirement requirement = new PackageRequirement(pckg, range);
      // TODO -- add this DI to module? new DI impl to remove delegate from policy when resolved module goes away?
      RequirementDependencyItem item = new RequirementDependencyItem(module, requirement, module.getClassLoaderState(), ControllerState.INSTALLED);
      if (item.resolve(controller))
      {
         ClassLoaderPolicy policy = getPolicy();
         // TODO -- add delegate to policy
         return delegate;
      }
      return null;
   }

This fixes a lot of your TODOs above. :-.)

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer Development at Community