Linux安全网 - Linux操作系统_Linux 命令_Linux教程_Linux黑客

会员投稿 投稿指南 本期推荐:
搜索:
您的位置: Linux安全网 > Linux集群 > Architecture > » 正文

SpringDM笔记28-OSGi Bundle Activities with Spring-DM

来源: SpringsFeng 分享至:

OSGi框架中也支持搞层次的模块交互:bundles.例如:

<bundle id="acmeBundle" symbolic-name="com.apress.springosgi.ACMEAirlines"/>

该配置将实例化一个org.osgi.framework.Bundle类型的Bean,该Bean来自symbolic name为:

com.apress.springosgi.ACMEAirlines的Bundle.

(1)bundle元素的属性:action

<bundle id="acmeBundle"
location="http://www.apress.com/springosgi/bundles/ACMEAirlines.jar"
symbolic-name="com.apress.springosgi.ACMEAirlines"
action="start"/>

该属性用于当Host Bundle的Spring上下文创建时改变Bundle的状态,该属性的常见值为:start,update,stop

和uninstall。

(2) bundl元素属性:destroy-action

该属性用于当Host Bundle的Spring上下文销毁时改变Bundle的状态。

(3) bundle元素属性: location

指定安装或更新Bundle时的物理路径。


Tags:
分享至:
最新图文资讯
1 2 3 4 5 6
验证码:点击我更换图片 理智评论文明上网,拒绝恶意谩骂 用户名:
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史