- 浏览: 544991 次
- 性别:
- 来自: 西安
文章分类
- 全部博客 (251)
- UML/RUP/软件工程 (0)
- DDD:领域驱动设计 (1)
- IaaS/Paas/SaaS (1)
- Hadoop/YARN (10)
- PBDP项目 (2)
- OSGi-基础 (7)
- OSGi-Aries (2)
- OSGi-SpringDM (32)
- Oracle/MySQL/SS (8)
- Felix/Equinox/Bnd (14)
- Virgo Server/Gemini (7)
- Weblogic/JBoss/Tomcat (10)
- ActiveMQ (14)
- Camel (1)
- Spring Roo/Eclipse (7)
- Java/JSP/JSF (10)
- Maven (19)
- ESB-Mule (1)
- ESB-ServiceMix (18)
- SOA/SCA/SDO (12)
- WebService/RESTful (17)
- JS/jQuery/ExtJS (4)
- Spring/JPA/MVC (15)
- SpringSecurity (5)
- BPM/jBPM (3)
- Hudson/SVN/CI (0)
- LinuxOS/虚拟化 (25)
- Office/OpenOffice (1)
- 项目管理 (5)
- POI/jFreeChart (1)
最新评论
-
panamera:
请问JMS Transport 发布的webservice 是 ...
CXF 提供的Service Transport-JMS Transpor -
jianyi296:
where is attachment.
CXF WebService Dynamic Client -
hj01kkk:
您好,我用jdbc-user-service为什么每次验证时都 ...
SpringSecurity笔记3-Authenticating Users:Authenticaton Strategy -
wufenglin1231:
你好,我在实现Mapping exceptions to re ...
RESTful 异常处理 -
xchd:
[echo] Project: common
[echo ...
Hive安装配置学习笔记
ServiceTracker
1. Dealing with the appearance or disappearance of services
(1)DEALING WITH AN INDIVIDUAL SERVICE REFERENCE:
<bean id="contactDao" class="com.manning.sdmia.directory.dao.jdbc.ContactDaoJdbc">
<property name="dataSource" ref="dataSource" />
</bean>
<osgi:service id="contactDaoOsgi" interface="com.manning.sdmia.directory.dao.ContactDao"
ref="contactDao" />
<osgi:reference id="contactDao" interface="com.manning.sdmia.directory.dao.ContactDao">
<bean id="contactService" class="com.manning.sdmia.directory.service.impl.ContactServiceImpl">
<property name="contactDao" ref="contactDao" />
</bean>
如果业务服务Bundle不包含用户的业务服务,但需要关键的业务服务;而此时DAO的依赖不满足,可按照下面的方法
解 决:
<osgi:reference id="contactDao" interface="com.manning.sdmia.directory.dao.ContactDao"
availability="optional"
/>
(2)DEALING WITH A COLLECTION OF SERVICE REFERENCES:
Spring DM populates the collections as needed. It adds matching services to the collection, and
when one of the services referenced in the collection is unregistered from the OSGi registry, Spring
DM automatically removes the reference from the collection. Note, though, that this is only valid for
collections (java.util.List and java.util.Set) that are managed by Spring DM. Indeed, Spring DM can’t
track service appearances and disappearances and update collections that it doesn’t totally control.
This is good news: we can use our collections of service references as any other collections. We
usually use collections by iterating over them, using Iterators, but there’s one important thing to
know when iterating over a collection of service references managed by Spring DM: even the
Iterator is dynamic. Imagine you start iterating over a collection of service references, and its
content changes during the iteration because some services were unregistered and some matching
services were registered. With Spring DM, you’ll be aware of this immediately, because the Iterator
will reflect these changes dynamically.
(3)REACTING TO THE APPEARANCE AND DISAPPEARANCE OF SERVICES
参考SpringDM_Paint Application.zip
2. Providing a new version of a component
For example, when updating the DAO API bundle, we’ll have to go through these steps:
(1)Stop the DAO API, DAO implementation, and service implementation bundles.
(2)Install the new versions.
(3)Update the bundles.
(4)Refresh the DAO API bundle (the OSGi framework will then automatically refresh all the bundles
that import Java packages exported by the DAO API bundle).
(5)Start the DAO API bundle.
3. 附件SpringDM_Paint Application.zip
发表评论
-
SpringDM笔记31-Testing with OSGi and SpringDM
2011-11-22 10:27 12461. 创建一个SpringDM测试类 SpringD ... -
SpringDM笔记30-OSGi中使用SSL/STL
2011-11-21 11:55 1319SSL:Secure Sockets Layer ... -
SpringDM笔记29-Require-Bundle与Import-Package的区别
2011-11-21 10:31 2238具体可参考:http://www.osgi.org/bl ... -
SpringDM笔记28-OSGi Bundle Activities with Spring-DM
2011-11-17 10:19 1159OSGi框架中也支持搞层次的模块交互:bundles.例如 ... -
SpringDM笔记28-Spring And OSGi:Layers of Integration
2011-11-15 11:00 11761. Application Design:Service和B ... -
SpringDM笔记27-Extending The Stand Extender and Configure
2011-09-02 09:38 8691. -
SpringDM笔记25-Using AJAX frameworks with Spring DM:GWT
2011-09-01 08:53 12001. Using Spring DM with AJAX fr ... -
SpringDM笔记24-Using action-based web frameworks with Spring DM:SpringMVC
2011-08-30 09:33 1478■ Action-based web frameworks ... -
SpringDM笔记23-Using the open EntityManager in view pattern实现延迟加载
2011-08-30 09:27 15671. The open EntityManager in vi ... -
SpringDM笔记22-Transactions Support With SpringDM
2011-08-29 21:24 12101. Spring’s transactional suppo ... -
SpringDM笔记21-Using ORM within OSGi with Spring DM
2011-08-25 10:31 2096Version 1.Object/relational ma ... -
SpringDM笔记20-Using JDBC within OSGi with Spring DM
2011-08-25 09:08 1776The public API for interact ... -
SpringDM笔记18-Designing OSGi Enterprise Applications
2011-08-22 11:08 11221. Organizing OSGi components ... -
SpringDM笔记17-Handling Collections of OSGi Services
2011-08-20 09:12 15421.Configuring collections:the l ... -
SpringDM笔记16-处理OSGi服务的动态性:事件
2011-08-19 09:51 17791. Service registration and unr ... -
SpringDM笔记15-通过声明特定的属性注册和引用服务
2011-08-18 11:01 14071. Configuration for registerin ... -
SpringDM笔记14-The thread context classloader 及在OSGi中的运用
2011-08-18 10:40 22481. Using the thread context cla ... -
SpringDM笔记13-OSGi服务注册与引用
2011-08-18 09:28 34501. Combining OSGi services and ... -
SpringDM笔记12-Spring DM’s web Extender运行机制
2011-08-17 11:04 2087SpringDM把一个WAR作为一个Bundle, 其实 ... -
SpringDM笔记11-Hard dependencies on the OSGi environment
2011-08-17 10:50 1414Any bean in a Spring DM app ...
相关推荐
NULL 博文链接:https://springsfeng.iteye.com/blog/1271565
spring-osgi-1.2.1-with-dependencies.zip spring-osgi-1.2.1-with-dependencies.zip spring-osgi-1.2.1-with-dependencies.zip
NULL 博文链接:https://springsfeng.iteye.com/blog/1152012
NULL 博文链接:https://springsfeng.iteye.com/blog/1259203
spring-osgi-core-1.2.1.jar spring-osgi-core-1.2.1-sources.jar spring-osgi-extender-1.2.1.jar spring-osgi-extender-1.2.1-sources.jar spring-osgi-io-1.2.1.jar spring-osgi-io-1.2.1-sources.jar spring-...
spring-osgi-1.2.0-with-dependencies.zip spring-osgi-1.2.0-with-dependencies.zip spring-osgi-1.2.0-with-dependencies.zip
spring-osgi-1.2.0-rc1-with-dependencies.zip
spring-dm整合osgi所需所有jar包
spring-osgi-1.2.1-with-dependencies完整包
Spring-DM指的是 Spring ...Spring-DM 的主要目的是能够方便地将 Spring 框架和OSGi框架结合在一起,使得使用Spring的应用程序可以方便简单地部署在OSGi环境中,利用OSGi框架提供的服务,将应用变得 更加模块化。
Spring Boot应用程序将这些程序包作为OSGI框架的额外程序包公开(以便能够使用公开的服务)。 有关请参见stackoverflow的帖子。嵌入式OSGI中的日志记录解决方案添加了描述的日志记录解决方案。
spring dm osgi 中的服务提供和模块化编程
学习SpringDM+OSGI的一些总结,自我学习,上传文档防止丢失。
httpcomponents-client-4.2-alpha1-osgi-bin.zip
osgi springdm.pdf
httpcomponents-client-4.2-alpha1-osgi-bin.tar.gz
Spring DM 1.1.x最大特性便...在多个Spring DM支持OSGi平台上运行)并且Spring DM Server并没有提供更多企业应用支持 不过对于刚 使用Spring DM进行WEB应用开发人来说成功地配置却不是件容易事,文档详细讲解了相关配置
spring1.2的包文件 spring-osgi-1.2.0.zip
osig与spring:springDM开发环境配置,eclipse配置osgi开发环境,及命令
基于java的开发源码-OSGi 分布式通讯组件 R-OSGi.zip 基于java的开发源码-OSGi 分布式通讯组件 R-OSGi.zip 基于java的开发源码-OSGi 分布式通讯组件 R-OSGi.zip 基于java的开发源码-OSGi 分布式通讯组件 R-OSGi.zip ...