- 浏览: 554131 次
- 性别:
- 来自: 西安
文章分类
- 全部博客 (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安装配置学习笔记
1. 创建工程
mvn archetype:create -DgroupId=com.manning.sdmia -DartifactId=SpringDM-Web-Sample
文件目录结构:
SpringDM-Web-Sample\
src/
main/
java/
webapp/
WEB-INF/
web.xml
index.html
index.jsp
test/
pom.xml:
...
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.4</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Include-Resource>
src/main/webapp
</Include-Resource>
<Web-ContextPath>
SpringDM-Web-Sample
</Web-ContextPath>
</instructions>
</configuration>
</plugin>
...
2. 工程打包
The bundle will be deployed in two steps: it will be deployed as a bundle in the OSGi container,
then the Spring DM web extender will react to its registration with OSGi by deploying it to the
web container. To be deployed by the web extender, a bundle needs to meet one of two
conditions:
■ Its filename ends with .war.
■ It contains a WEB-INF directory at its root.
3. 部署测试
install file:///D:/sts_workspace/SpringDM-Web-Sample/target/SpringDM-Web-Sample-1.0.0.jar
访问地址路径:
■ http://localhost:8080/SpringDM-Web-Sample/
■ http://localhost:8080/SpringDM-Web-Sample/index.jsp
测试代码:
public class SpringDmWebSampleTest extends AbstractConfigurableBundleCreatorTests {
public void testIntegration() throws Exception{
boolean bundleIsHereAndStarted = false;
for(Bundle bundle : bundleContext.getBundles()){
if("com.manning.sdmia.SpringDM-Web-Sample".equals(bundle.getSymbolicName())
&&bundle.getState() == Bundle.ACTIVE){
bundleIsHereAndStarted = true;
break;
}
}
assertEquals("SpringDM-Web-Bundle is not installed or activated!", bundleIsHereAndStarted);
Thread.sleep(10*1000);
testConnection("http://localhost:8080/SpringDM-Web-Sample/index.html");
testConnection("http://localhost:8080/SpringDM-Web-Sample/index.jsp");
}
private void testConnection(String address) throws Exception {
URL url = new URL(address);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setUseCaches(false);
try {
con.connect();
assertEquals(HttpURLConnection.HTTP_OK, con.getResponseCode());
} finally {
con.disconnect();
}
}
@Override
protected String[] getTestBundlesNames() {
return new String[] {
"org.springframework.osgi, spring-osgi-web,"
+ getSpringDMVersion(),
"org.springframework.osgi, spring-osgi-web-extender,"
+ getSpringDMVersion(),
"javax.servlet, com.springsource.javax.servlet, 2.4.0",
"org.springframework.osgi, catalina.osgi, 5.5.23-SNAPSHOT",
"org.springframework.osgi, catalina.start.osgi, 1.0.0",
"org.springframework.osgi, jsp-api.osgi, 2.0-SNAPSHOT",
"org.springframework.osgi, jasper.osgi, 5.5.23-SNAPSHOT",
"org.springframework.osgi, commons-el.osgi, 1.0-SNAPSHOT",
"org.springframework.osgi, jstl.osgi, 1.1.2-SNAPSHOT",
"com.manning.sdmia, SpringDM-Web-Sample, 1.0.0" };
}
@Override
protected Resource getTestingFrameworkBundlesConfiguration() {
return new InputStreamResource(SpringDmWebSampleTest.class
.getResourceAsStream("boot-bundles.properties"));
}
}
其中文件boot-bundles.properties:
4.启动容器
java -jar org.eclipse.osgi-3.5.1.R35x_v20090827.jar -console
5.案例代码
将附件SpringDM-Web-Sample.rar
评论
发表评论
-
SpringDM笔记31-Testing with OSGi and SpringDM
2011-11-22 10:27 12711. 创建一个SpringDM测试类 SpringD ... -
SpringDM笔记30-OSGi中使用SSL/STL
2011-11-21 11:55 1339SSL:Secure Sockets Layer ... -
SpringDM笔记29-Require-Bundle与Import-Package的区别
2011-11-21 10:31 2272具体可参考:http://www.osgi.org/bl ... -
SpringDM笔记28-OSGi Bundle Activities with Spring-DM
2011-11-17 10:19 1187OSGi框架中也支持搞层次的模块交互:bundles.例如 ... -
SpringDM笔记28-Spring And OSGi:Layers of Integration
2011-11-15 11:00 12011. Application Design:Service和B ... -
SpringDM笔记27-Extending The Stand Extender and Configure
2011-09-02 09:38 8981. -
SpringDM笔记25-Using AJAX frameworks with Spring DM:GWT
2011-09-01 08:53 12251. Using Spring DM with AJAX fr ... -
SpringDM笔记24-Using action-based web frameworks with Spring DM:SpringMVC
2011-08-30 09:33 1507■ Action-based web frameworks ... -
SpringDM笔记23-Using the open EntityManager in view pattern实现延迟加载
2011-08-30 09:27 15861. The open EntityManager in vi ... -
SpringDM笔记22-Transactions Support With SpringDM
2011-08-29 21:24 12421. Spring’s transactional suppo ... -
SpringDM笔记21-Using ORM within OSGi with Spring DM
2011-08-25 10:31 2128Version 1.Object/relational ma ... -
SpringDM笔记20-Using JDBC within OSGi with Spring DM
2011-08-25 09:08 1803The public API for interact ... -
SpringDM笔记19-SpringDM如何处理OSGi应用的动态行为
2011-08-24 08:51 1173ServiceTracker 1. Dealing ... -
SpringDM笔记18-Designing OSGi Enterprise Applications
2011-08-22 11:08 11471. Organizing OSGi components ... -
SpringDM笔记17-Handling Collections of OSGi Services
2011-08-20 09:12 15721.Configuring collections:the l ... -
SpringDM笔记16-处理OSGi服务的动态性:事件
2011-08-19 09:51 18121. Service registration and unr ... -
SpringDM笔记15-通过声明特定的属性注册和引用服务
2011-08-18 11:01 14401. Configuration for registerin ... -
SpringDM笔记14-The thread context classloader 及在OSGi中的运用
2011-08-18 10:40 22751. Using the thread context cla ... -
SpringDM笔记13-OSGi服务注册与引用
2011-08-18 09:28 34821. Combining OSGi services and ... -
SpringDM笔记12-Spring DM’s web Extender运行机制
2011-08-17 11:04 2121SpringDM把一个WAR作为一个Bundle, 其实 ...
相关推荐
**SpringDM笔记7-开发SpringDM Bundle** SpringDM(Spring Dynamic Modules)是Spring框架的一个扩展,专门用于OSGi(Open Service Gateway Initiative)环境中的应用程序开发。OSGi是一种Java模块化系统,它允许...
在本文中,我们将深入探讨Spring DM(现在称为Spring OSGi)中的Fragment Bundle以及如何配置Log4j在Fragment Bundle中的应用。Spring DM是Spring框架在OSGi(Open Service Gateway Initiative)环境下的扩展,它...
在SpringDM(Spring Dynamic Modules)框架中,OSGi(Open Service Gateway Initiative)服务注册与引用是核心功能之一,它使得模块化系统中的组件能够互相发现并交互。本篇笔记将探讨如何在OSGi环境中注册服务以及...
"adt-bundle-windows-x86-20140624工具文件"是一个专为Windows平台上的x86架构设计的Android开发工具包。这个压缩包包含了Android开发者需要的一系列核心工具,使得用户能够在本地环境中创建、调试和发布Android应用...
"adt-bundle-windows-x86_64-20140624" 是一个专为Windows 64位系统设计的Android开发工具包,它包含了开发Android应用所需的所有基本组件,是Android开发者的重要工具。这个版本发布于2014年6月24日,为当时的...
"adt-bundle-windows-x86-20140624" 是一个专为Windows平台32位架构设计的Android开发工具包。这个压缩包是Google为了方便开发者进行Android应用开发而提供的集成环境,包含了所有必要的工具和软件,使得开发者能够...
下面俩个版本都能正常使用: 编译器版本号:adt-bundle-windows-x86_64-20130717 编译器版本号:adt-bundle-windows-x86_64-20130917 汉化方法: 拷贝中文包中的文件到编译器同名目录下
adt-bundle-windows-x86_64_20140101.zip下载,百度云盘分享链接下载
sqlite-netFx40-setup-bundle-x86-2010-1.0.113.0.exe
Android 集成开发环境 adt-bundle-windows-x86_64-20131030(64位, 多SDK版) 自带Eclipse, Android SDK(2.2到4.4的SDK都有),自己下载后重新打的包
adt-bundle-windows-x86_64-20190307, 支持android4.4、android5.1 android6.0 android7.1 android8.1 androidP
4. **Groovy/Grails支持**:Grails是基于Groovy语言的Web开发框架,STS提供了良好的集成,便于使用Grails进行开发。 5. **Spring Boot支持**:STS对Spring Boot有深度集成,包括启动器向导、配置编辑器以及Actuator...
标题“spring-dm-osgi整合jar包”和描述“spring-dm整合osgi所需所有jar包”提及的核心知识点是Spring Dynamic Modules(简称Spring DM)与OSGi(Open Service Gateway Initiative)框架的集成。这两个技术在Java...
### OSGi与Spring:Spring DM开发环境配置详解 #### 一、引言 随着软件架构的不断发展,模块化和微服务化的趋势日益明显。在Java领域,OSGi(Open Service Gateway Initiative)作为一套成熟的技术标准,为实现模块...
postgis-bundle-pg15x64-setup-3.3.2-2.exe是一个安装程序,用于在64位操作系统上安装PostGIS和PostgreSQL扩展。PostGIS是一个开源的空间数据库扩展,它允许用户在PostgreSQL数据库中存储和查询地理空间数据。该扩展...
adt-bundle-windows-x86,adt-bundle-windows-x86,adt-bundle-windows-x86 adt-bundle-windows-x86,adt-bundle-windows-x86,adt-bundle-windows-x86 adt-bundle-windows-x86,adt-bundle-windows-x86,adt-bundle-...
- **版本更新**:虽然 `adt-bundle-windows-x86-20130522` 版本相对较旧,但在当时是非常流行的开发工具。不过,随着技术的发展,建议使用最新的开发工具,例如 Android Studio,它已经取代了 Eclipse ADT 成为官方...
android-studio-bundle-145.3537739-windows 目前来说android最新开发工具。
5. **Web Support**:Spring DM增加了对Web应用的支持,使得开发者可以更方便地在OSGi环境中部署和管理Web应用。 6. **Classpath Resource Abstraction**:引入了资源抽象层,使得开发者可以通过统一的方式访问类...
标题中的"gatling-charts-highcharts-bundle-3.3.1-bundle.zip"表明这是一个包含Gatling-Charts-Highcharts-Bundle 3.3.1版本的压缩包文件。这个版本可能包含了该工具的所有组件,包括Gatling的执行引擎、Highcharts...