加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

JBoss AS 6.1.0 Final 启动的xml描述文件解析与对应的解析类

发布时间:2020-12-16 06:40:49 所属栏目:百科 来源:网络整理
导读:前面所说,JBoss AS 6.1.0 Final 以 bootstram.xml 作为入口,读取bootstram.xml 中的其他 8个描述文件并部署到内核中。 启动过程就是部署过程。 一、启动文件 bootstram.xml bootstram.xml 对应的实体类为BootstrapMetaData ,解析类为BootstrapSchemaBindi

前面所说,JBoss AS 6.1.0 Final 以 bootstram.xml 作为入口,读取bootstram.xml 中的其他 8个描述文件并部署到内核中。

启动过程就是部署过程。


一、启动文件 bootstram.xml

bootstram.xml 对应的实体类为BootstrapMetaData ,解析类为BootstrapSchemaBinding ,

解析过程由BootstrapParser.parse( bootstrapUrl) 完成,bootstrapUrl 是 bootstramp.xml 的绝对路径。


 
<?xml version="1.0" encoding="UTF-8"?>
<bootstrap xmlns="urn:jboss:bootstrap:1.0">

   <url>bootstrap/classloader.xml</url>
   <url>bootstrap/stdio.xml</url>
   <url>bootstrap/kernel.xml</url>
   <url>bootstrap/aop.xml</url>
   <url>bootstrap/jmx.xml</url>
   <url>bootstrap/deployers.xml</url>
   <url>bootstrap/profile.xml</url>
   <url>bootstrap/security.xml</url>
</bootstrap>
  


 
  protected void setupBootstrapDescriptorsFromBootstrapUrl()   {
      ...
      final BootstrapMetaData bmd = BootstrapParser.parse(bootstrapUrl);
      final List<String> urlStrings = bmd.getBootstrapURLs();
      ...
  }
  


二、描述文件

bootstrap.xml中url 指定的xml文件,对应的实体类是KernelDeployment (AbstractKernelDeployment),解析类为SchemaBindingResolver,

解析过程由TempBasicXMLDeployer 完成。

 
TempBasicXMLDeployer kernelDeployer= new TempBasicXMLDeployer(kernel);
kernelDeployer.deploy();
 


每个KernelDeployment 包含一个或多个 bean 的元数据,

每个 bean 元数据被封装成 KernelControllerContext 交由 KernelController 处理。


这里面涉及到 xml 文件经过 jbossxb 的解析过程(暂时略过)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读