![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OSGi-SpringDM
文章平均质量分 66
biyuchenfeng531588
这个作者很懒,什么都没留下…
展开
-
SpringDM笔记8-开发SpringDM Web Bundle
1. 创建工程 mvn archetype:create -DgroupId=com.manning.sdmia -DartifactId=SpringDM-Web-Sample 文件目录结构: SpringDM-Web-Sample\ src/ main/ java/ w...原创 2011-08-15 16:43:12 · 153 阅读 · 0 评论 -
SpringDM笔记25-Using AJAX frameworks with Spring DM:GWT
1. Using Spring DM with AJAX frameworks Integrating Spring DM with AJAX frameworks involves exporting OSGi services referenced through Spring DM as remote services with the exporting facili...原创 2011-09-01 08:53:23 · 91 阅读 · 0 评论 -
SpringDM笔记27-Extending The Stand Extender and Configure
1.原创 2011-09-02 09:38:55 · 84 阅读 · 0 评论 -
SpringDM笔记1-SpringDM与Spring
1.Spring实现模块化的缺陷 (1) 配置文件复杂难于维护 (2) Bean之间的依赖是静态的,在容器启动后运行期是无法更新的 (3) Bean之间的依赖是容器自动计算出来的,开发人员无法操作,对Circle依赖支持不好2. Spring DM extender The Spring DM extender is an OSGi bundle that...原创 2011-08-09 10:03:51 · 299 阅读 · 0 评论 -
SpringDM笔记2-SpringDM版HelloWorld
1. 构建运行目录 (1)创建SpringDM-HelloWorld文件夹,解压spring-osgi-2.0.0.M1-with-dependencies.zip,复制lib目录下的 org.eclipse.osgi-3.5.1.R35x_v20090827.jar至SpringDM - 的HelloWorld下,测试: java -jar org.eclipse....原创 2011-08-11 11:03:38 · 202 阅读 · 0 评论 -
SpringDM笔记0-Eclipse下SpringDM开发环境配置
1. 安装Eclipse3.7 推荐使用:Eclipse Classic版本 下载地址:http://www.eclipse.org/downloads/或http://download.eclipse.org/eclipse/downloads/2. 安装SpringIDE 如果要支持可视化操作需先安装:http://download.eclipse.org/t...原创 2011-08-11 15:01:23 · 173 阅读 · 0 评论 -
SpringDM笔记3-MAINFEST.NF文件:Header,Version配置
1. The configuration of a header follows the syntax illustrated in the following snippet: Header-Name: header-value1;directive1:=value1;directive2:=value2, header-value2;directive1:="it...原创 2011-08-12 10:05:57 · 210 阅读 · 0 评论 -
SpringDM笔记4-OSGi组件中使用Spring
1.Embedding the Spring application context within components SpringDM引入了一种新类型的Bundle:Spring-powered bundles,SpringDM会自动的给这种Bundle提供一个Spring 应用上下文,此时可使用Spring框架所有的特性,如:依赖注入,AOP,事物管理等特性;同时该类型的Bu...原创 2011-08-13 12:15:26 · 252 阅读 · 0 评论 -
SpringDM笔记5-SpringDM开发步骤
1. Configuring a Container 建立一个开发目录,在目录中加入:org.eclipse.osgi-3.5.1.R35x_v20090827.jar,并在该目录下建立configuration 目录,在该目录中建立文件:config.ini,为解决在启动该容器时,Equino试图启动Eclipse的问题,需在config.ini中作以 配置: ...原创 2011-08-14 11:36:57 · 281 阅读 · 0 评论 -
SpringDM笔记6-Fragment及配置Log4j Fragment Bundle
未配置日志配置文件前,系统会抛出下面异常: log4j:WARN No appenders could be found forlogger(org.springframework.osgi.extender.internal .boot.ChainActivator). log4j:WARN Please initialize the log4j system proper...原创 2011-08-14 12:27:01 · 421 阅读 · 0 评论 -
SpringDM笔记7-开发SpringDM Bundle
基于Maven创建:1. mvn archetype:create -DgroupId=com.manning.sdmia -DartifactId=SpringDM-Sample mvn eclipse:eclipse2. Package:Felix Bundle Plugin pom.xml: ... <build> ...原创 2011-08-15 09:41:17 · 192 阅读 · 0 评论 -
SpringDM笔记28-Spring And OSGi:Layers of Integration
1. Application Design:Service和Bean Service for OSGi and Beans for Spring。2. Application Packaging: Dependencies Package Unit:Bundle3. Applicaton Server: Classpath Loader (1) 应用服务器上运...原创 2011-11-15 11:00:26 · 85 阅读 · 0 评论 -
SpringDM笔记28-OSGi Bundle Activities with Spring-DM
OSGi框架中也支持搞层次的模块交互:bundles.例如: <bundle id="acmeBundle" symbolic-name="com.apress.springosgi.ACMEAirlines"/> 该配置将实例化一个org.osgi.framework.Bundle类型的Bean,该Bean来自symbolic name为: com.apress...原创 2011-11-17 10:19:38 · 98 阅读 · 0 评论 -
SpringDM笔记29-Require-Bundle与Import-Package的区别
具体可参考:http://www.osgi.org/blog/2006/04/misconceptions-about-osgi-headers.htm1.Require-Bundle和Import-Package之关联至Bundle生命周期中的Resolving,Resolving 是各不同Bundle在 Package层级上进行wire的过程;这两个Header声明之间的区别...原创 2011-11-21 10:31:04 · 164 阅读 · 0 评论 -
SpringDM笔记30-OSGi中使用SSL/STL
SSL:Secure Sockets Layer TLS:Transport Layer Security1.Tomcat中设置SSL server.xml文件: <Server port="8005" shutdown="SHUTDOWN"> <Service name="Catalina"> ...原创 2011-11-21 11:55:17 · 152 阅读 · 0 评论 -
SpringDM笔记24-Using action-based web frameworks with Spring DM:SpringMVC
■ Action-based web frameworks■ Component-driven frameworks■ AJAX-based frameworks■ Web servicesAction-based web frameworks are responsible for selecting the appropriate actions to handle req...原创 2011-08-30 09:33:37 · 170 阅读 · 0 评论 -
SpringDM笔记23-Using the open EntityManager in view pattern实现延迟加载
1. The open EntityManager in view pattern 使用Hibernate实现延迟加载时常见的异常: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.manning.sdmia.da...原创 2011-08-30 09:27:01 · 100 阅读 · 0 评论 -
SpringDM笔记9-SpringDM Stand Extender 运行机制
扩展模型指一个Bundle在扫描其他Bundle内容的过程中,该Bundle代表被扫描Bundle执行其Action. 而在SpringDM中,扩展模型指当在MANIFEST.MF文件或Bundle的内容中有指定的扩展存在时,SpringDM应该自动的触发连锁的事件(Event),即创建Spring Context, 该Context包括一个特指的类型上下文:OsgiBundle-...原创 2011-08-16 09:37:30 · 213 阅读 · 0 评论 -
SpringDM笔记10-Listening to extender events with the whiteboard pattern
1. THE SPRING DM EVENT MECHANISM The available events are Java classes in the org.springframework.osgi.context.event package and they’re listed below: (1)OsgiBundleContextRefreshedEven...原创 2011-08-17 10:28:53 · 93 阅读 · 0 评论 -
SpringDM笔记11-Hard dependencies on the OSGi environment
Any bean in a Spring DM application context can easily get a reference to its bundle context by implementing the BundleContextAware interface (located in the org.springframework.osgi.context...原创 2011-08-17 10:50:53 · 135 阅读 · 0 评论 -
SpringDM笔记12-Spring DM’s web Extender运行机制
SpringDM把一个WAR作为一个Bundle, 其实是将对WAR的处理交给当前OSGi环境中的WEB容器去处理的,即:WEB Application的创建和线程的管理委托给了WEB容器。那么SpringDMV是如何决定一个Bundle是要委托给WEB容得的呢?实现这个功能主要是通过Spring的:Extender 机制: 如果一个安装的Bundle是以.war作为...原创 2011-08-17 11:04:16 · 166 阅读 · 0 评论 -
SpringDM笔记13-OSGi服务注册与引用
1. Combining OSGi services and dependency injection SERVICE PROXYING: Spring DM’s service support is powerful and takes care of a lot of things under the hood by using a proxy mechan...原创 2011-08-18 09:28:51 · 393 阅读 · 0 评论 -
SpringDM笔记14-The thread context classloader 及在OSGi中的运用
1. Using the thread context classloader(TCCL) By default, the TCCL is the application’s classloader, it can be accessed through the getContextClassLoader method of the current thread, as sh...原创 2011-08-18 10:40:48 · 220 阅读 · 0 评论 -
SpringDM笔记15-通过声明特定的属性注册和引用服务
1. Configuration for registering services:The tag:service (1)BEAN REFERENCE Spring DM also supports the use of an anonymous bean(inner bean) within the service tag, as shown in the fol...原创 2011-08-18 11:01:03 · 174 阅读 · 0 评论 -
SpringDM笔记16-处理OSGi服务的动态性:事件
1. Service registration and unregistration events Spring DM provides two ways to implement and configure listeners: ■ Make the service implement the OsgiServiceRegistrationListener interfa...原创 2011-08-19 09:51:54 · 161 阅读 · 0 评论 -
SpringDM笔记17-Handling Collections of OSGi Services
1.Configuring collections:the list tag for lists and the set tag for sets <beans (...)> <osgi:list id="testServices" interface="com.manning.sdmia.springdm.se...原创 2011-08-20 09:12:46 · 103 阅读 · 0 评论 -
SpringDM笔记18-Designing OSGi Enterprise Applications
1. Organizing OSGi components (1) ORGANIZING THE DEPENDENCIES The WAR Structure: ■ It’s a ZIP file ■ Downloadable resources (images, JavaScript files) are located at the root of th...原创 2011-08-22 11:08:19 · 92 阅读 · 0 评论 -
SpringDM笔记19-SpringDM如何处理OSGi应用的动态行为
ServiceTracker1. Dealing with the appearance or disappearance of services (1)DEALING WITH AN INDIVIDUAL SERVICE REFERENCE: <bean id="contactDao" class="com.manning.sdmia.directory...原创 2011-08-24 08:51:38 · 191 阅读 · 0 评论 -
SpringDM笔记20-Using JDBC within OSGi with Spring DM
The public API for interacting with databases is provided directly in Java SE within the java.sql package. This package provides the key abstractions corresponding to connections, statements, ...原创 2011-08-25 09:08:16 · 133 阅读 · 0 评论 -
SpringDM笔记21-Using ORM within OSGi with Spring DM
Version1.Object/relational mapping (1)JPA CONCEPTS Although any database-based Java application must rely on JDBC, there’s a structural mismatch between object-oriented applications, whi...原创 2011-08-25 10:31:38 · 169 阅读 · 0 评论 -
SpringDM笔记22-Transactions Support With SpringDM
1. Spring’s transactional support Spring’s transactional support consists of two main parts for managing transactions on beans that are managed by the container: ■ Transactional synchr...原创 2011-08-29 21:24:08 · 107 阅读 · 0 评论 -
SpringDM笔记31-Testing with OSGi and SpringDM
1. 创建一个SpringDM测试类 SpringDM测试类均位于org.springframework.osgi.test包下,以Abstract开头以Test结尾,常见的测试辅助类及 类继承关系见附件:Spring-DM Test Classes and Inheritance Hierarchy.rar.2. SpringDM测试类举例 ... ...原创 2011-11-22 10:27:17 · 99 阅读 · 0 评论