JBoss AS 6.1.0 Final Kernel 启动过程类的关系

时间:2021-12-31 15:58:42


BasicBootstrap 是在 initialize  过程中被实例化的。

1、BasicBootstrap 构造方法中,创建了KernelConfig的子类 ProptyKernelConfig 的实例,并保存到AbstractBootstrap 中。

2、BasicBootstrap 通过 KernelFactory的静态方法 newInstance()创建 Kernerl实例,并保存到AbstractKernelObject 中。

3、ProptyKernelConfig 创建了BasicKernelInitializer实例;

4、BasicKernelInitializer 通过 kernel.getKernelConfig() 即 ProptyKernelConfig  ,创建了 Kernel 实例中的所有成员变量并赋值给Kernel的实例。



JBoss AS 6.1.0 Final Kernel 启动过程类的关系



所有的Kernel 成员变量的类型,定义在  KernelConstants 中:


 
public interface KernelConstants
{
   /** The default kernel name */
   static final String KERNEL_NAME = "jboss.kernel:service=Kernel"; 
   
   /** The default kernel bus name */
   static final String KERNEL_BUS_NAME = "jboss.kernel:service=KernelBus"; 
   
   /** The kernel bus property */
   static final String KERNEL_BUS_PROPERTY = KernelBus.class.getName(); 
   
   /** The default kernel bus implementation */
   static final String KERNEL_BUS_CLASS = "org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus"; 
   
   /** The default kernel config name */
   static final String KERNEL_CONFIG_NAME = "jboss.kernel:service=KernelConfig"; 
   
   /** The default kernel configurator name */
   static final String KERNEL_CONFIGURATOR_NAME = "jboss.kernel:service=KernelConfigurator"; 
   
   /** The kernel configurator property */
   static final String KERNEL_CONFIGURATOR_PROPERTY = KernelConfigurator.class.getName(); 
   
   /** The default kernel configurator implementation */
   static final String KERNEL_CONFIGURATOR_CLASS = "org.jboss.kernel.plugins.config.AbstractKernelConfigurator"; 
   
   /** The default kernel controller name */
   static final String KERNEL_CONTROLLER_NAME = "jboss.kernel:service=KernelController"; 
   
   /** The kernel controller property */
   static final String KERNEL_CONTROLLER_PROPERTY = KernelController.class.getName(); 
   
   /** The default kernel controller implementation */
   static final String KERNEL_CONTROLLER_CLASS = "org.jboss.kernel.plugins.dependency.AbstractKernelController"; 
   
   /** The default kernel event manager name */
   static final String KERNEL_EVENT_MANAGER_NAME = "jboss.kernel:service=KernelEventManager"; 
   
   /** The kernel event manager property */
   static final String KERNEL_EVENT_MANAGER_PROPERTY = KernelEventManager.class.getName(); 
   
   /** The default kernel event manager implementation */
   static final String KERNEL_EVENT_MANAGER_CLASS = "org.jboss.kernel.plugins.event.AbstractEventManager"; 
   
   /** The default kernel initializer */
   static final String KERNEL_INITIALIZER_NAME = "jboss.kernel:service=KernelInit"; 
   
   /** The kernel initializer property */
   static final String KERNEL_INITIALIZER_PROPERTY = KernelInitializer.class.getName(); 
   
   /** The default kernel initializer implementation */
   static final String KERNEL_INITIALIZER_CLASS = "org.jboss.kernel.plugins.bootstrap.basic.BasicKernelInitializer"; 
   
   /** The default kernel registry name */
   static final String KERNEL_REGISTRY_NAME = "jboss.kernel:service=KernelRegistry"; 
   
   /** The kernel registry property */
   static final String KERNEL_REGISTRY_PROPERTY = org.jboss.kernel.spi.registry.KernelRegistry.class.getName(); 
   
   /** The default kernel registry implementation */
   static final String KERNEL_REGISTRY_CLASS = "org.jboss.kernel.plugins.registry.basic.BasicKernelRegistry"; 
   
   /** The default meta data repository name */
   static final String KERNEL_METADATA_REPOSITORY_NAME = "jboss.kernel:service=MetaDataRepository"; 
   
   /** The meta data repository property */
   static final String KERNEL_METADATA_REPOSITORY_PROPERTY = KernelMetaDataRepository.class.getName(); 
   
   /** The default meta data repository implementation */
   static final String KERNEL_METADATA_REPOSITORY_CLASS = "org.jboss.kernel.plugins.metadata.basic.BasicKernelMetaDataRepository"; 

   /** The kernel bean validator repository name */
   static final String KERNEL_BEAN_VALIDATOR_NAME = "jboss.kernel:service=BeanValidator";

   /** The kernel bean validator */
   static final String KERNEL_BEAN_VALIDATOR_PROPERTY = KernelBeanValidator.class.getName();

   /** The default meta data repository implementation */
   static final String KERNEL_BEAN_VALIDATOR_CLASS = "org.jboss.kernel.plugins.validation.basic.BasicKernelBeanValidator";

   /** The DependencyBuilder repository name */
   static final String DEPENDENCY_BUILDER_NAME = "jboss.kernel:service=DependencyBuilder";
   
   /** The DependencyBuilder property name */
   static final String DEPENDENCY_BUILDER_PROPERTY = DependencyBuilder.class.getName();

   /** The DependencyBuilder default value */
   static final String DEPENDENCY_BUILDER_DEFAULT = "org.jboss.aop.microcontainer.integration.AOPDependencyBuilder:org.jboss.kernel.spi.dependency.helpers.AbstractDependencyBuilder";
}