3 Replies Latest reply on Jul 24, 2008 9:07 AM by adrian.brock

    KernelRegistry - unnecessary Exception construction

      I'm seeing this as a "hotspot" during bootstrap.

       org.jboss.kernel.plugins.registry.AbstractKernelRegistry.getEntry(AbstractKernelRegistry.java:89)
       org.jboss.kernel.plugins.dependency.AbstractKernelController.getContext(AbstractKernelController.java:154)
       org.jboss.dependency.plugins.AbstractDependencyItem.resolve(AbstractDependencyItem.java:128)
       org.jboss.dependency.plugins.AbstractDependencyInfo.resolveDependencies(AbstractDependencyInfo.java:143)
       org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:951)
       org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:889)
       org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
       org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:672)
       org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
       org.jboss.system.ServiceController.doChange(ServiceController.java:664)
      


      The reason is that it gets called a lot and throws
      KernelRegistryEntryNotFoundException
      when the context is not installed yet.

      Absent doing the work to remove the deprecated KernelReigstry
      we should probably just add a findEntry() method
      that returns null and use that from the KernelController.

      The only reason this call exists is because of the KernelRegistryPlugins
      support for which should be moved to the KernelController.