osgi bundle取消部署如何在jboss上运行?

时间:2016-10-17 14:45:17

标签: jboss osgi wildfly osgi-bundle

我有两个OSGI包(base,dependent),依赖包访问基本包的一些API。当我取消部署基础包并重新部署它时,我得到"由以下引起:org.jboss.msc.service.DuplicateServiceException:Service jboss.module.spec.service。" deployment.base-1.0。 jar" .main已经注册" ,但是基础包的取消部署成功了。

我想了解当有几个依赖于它的bundle时,osgi bundle的取消部署是如何工作的。

Base Bundle Manifest

清单 - 版本:1.0

Bundle-Activator:com.learning.base.BaseBundleActivator

Bundle-Category:osgi

Bundle-ManifestVersion:2

Bundle-Name:base

Bundle-SymbolicName:OSGI.base

Bundle-Version:1.0.0

创建者:Apache Maven Bundle插件

Export-Package:org.osgi.framework; version =" 1.7",com.learning.base.model; version =" 1.0.0",com.learning。 base.service;版本=" 1.0.0&#34 ;;用途:=" com.learning.base.model"

Import-Package:com.learning.base.model; version =" [1.0,2)",com.learning.base.service; version =" [1.0,2) ",javax.security.auth.x500中,org.osgi.framework;版本=" [1.7,2)"

需要能力:osgi.ee;过滤器:="(&(osgi.ee = JavaSE)(版本= 1.8))"

工具:Bnd-3.2.0.201605172007

依赖捆绑清单

清单 - 版本:1.0

Bundle-Activator:com.learning.dependent.DependentBundleActivator

Bundle-Category:osgi

Bundle-Name:dependent

Bundle-SymbolicName:OSGI.dependent

Bundle-Version:1.0.0

创建者:Apache Maven Bundle插件

Export-Package:com.learning.dependent.model; version =" 1.0.0&#34 ;; uses:=" com.learning.base.model",com.learning。 dependent.service;版本=" 1.0.0&#34 ;;用途:=" com.learning.dependent.model,org.osgi.framework"

Import-Package:org.osgi.framework; version =" [1.7,2)",com.learning.base.model; version =" [1.0,2)&# 34;,com.learning.base.service;版本=" [1.0,2)"

需要能力:osgi.ee;过滤器:="(&(osgi.ee = JavaSE)(版本= 1.8))"

工具:Bnd-3.2.0.201605172007

0 个答案:

没有答案