Upgrade to Pro — share decks privately, control downloads, hide ads and more …

virgo入门.pdf

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for nile nile
March 17, 2013

 virgo入门.pdf

eclipse virgo介绍

Avatar for nile

nile

March 17, 2013

More Decks by nile

Other Decks in Technology

Transcript

  1. 名称 意义 备注 Import-Package 定义需要导入的包 在解析阶段 DynamicImport-Package 动态导入的包 运行阶段 Export-Package

    定义导出的包 解析阶段 Require-Bundle 定义依赖的 Bundle 解析阶段(所有的export 都会被导入) Bundle-Classpath 在bundle内的jar包和 class文件路径 运行阶段 名称 意义 备注 Bundle-Name 无需解释 Bundle-Version Bundle的版本 1.2.3 Bundle-SymbolicName Bundle标识名称 Com.broada.osgi.test Web-ContextPath War包使用 numen Bundle-ManifestVersion 定义依赖的 Bundle 2 OSGi bundle-定义
  2. OSGi 类加载 1. 如类资源属于 java.* 包,则将加载请求委托给父加载器; 2. 如类资源定义在 OSGi 框架中启动委托列表(org.osgi.framework.bootdelegation)

    中,则将加载请求委托给父加载器; 3. 如类资源属于在 Import-Package 中定义的包,则框架通过 Class Loader 依赖关 系图找到导出此包的 Bundle 的 Class Loader,并将加载请求委托给此 Class Loader ; 4. 如类资源属于在 Require-Bundle 中定义的 Bundle,则框架通过 Class Loader 依 赖关系图找到此 Bundle 的 Class Loader,将加载请求委托给此 Class Loader ; 5. Bundle 搜索自己的类资源 ( 包括 Bundle-Classpath 里面定义的类路径和属于 Bundle 的 Fragment 的类资源); 6. 若类在 DynamicImport-Package 中定义,则开始尝试在运行环境中寻找符合条件 的 Bundle 。 • Parent/System class loader • System Bundle class loader • Bundle class loader
  3. OSGi 服务  注册  引用  服务查找  跟踪

     取消注册  Spring DM  Blueprint 服务引用 服务提供 (计算在服务提 供者完成) 服务请求 类引用 (计算在服务提 供者完成) 类库提供 导入类库
  4. Virgo 一些基础概念  一个可运行的OSGi容器  Artifacts:部件  configuration ,PAR, plan,

    library  Provisioning Repository:仓库  分成三种类型:external, watched, remote  Region:分区  Kernel and User  p2: 没懂
  5. Virgo 提供了什么  OSGi容器  Admin console  Log service

     Configuration  Repository  Shell  Jmx  节点管理?  集群?
  6. Virgo 提供了什么  OSGi容器  Admin console  Log service

     Configuration  Repository  Shell  Jmx  节点管理?  集群?
  7. Virgo 提供了什么  OSGi容器  Admin console  Log service

     Configuration  Repository  Shell  Jmx  节点管理?  集群?
  8. Virgo的命令行 Command Description bundle Manages and displays information about bundle

    artifacts. clhas Lists all bundles that contain a class or resource. clexport Lists all bundles that export a class or package. clload Lists all bundles that can load a class. config Manages and displays information about configuration artifacts. packages Displays information about exported packages. par Manages and displays information about PAR artifacts. plan Manages and displays information about plan artifacts. service Displays information about services in the OSGi service registry. install Installs an artifact to Virgo Kernel. shutdown Shuts down the Virgo Kernel instance to which the Equinox Console is connected.