- 浏览: 545219 次
- 性别:
- 来自: 西安
文章分类
- 全部博客 (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. Building an OSGi Bundle
通过调用Maven Archetype生成Maven Project,例如:
(1) Apache CXF code-first archetype
mvn archetype:generate -DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-cxf-code-first-osgi-bundle -DarchetypeVersion=2012.01.0.fuse-7-060 -DgroupId=GroupId -DartifactId=ArtifactId -Dversion=Version
(2) Apache CXF WSDL-first archetype
mvn archetype:generate -DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-cxf-wsdl-first-osgi-bundle -DarchetypeVersion=2012.01.0.fuse-7-060 -DgroupId=GroupId -DartifactId=ArtifactId -Dversion=Version
(3) Apache Camel archetype
mvn archetype:generate -DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-camel-osgi-bundle -DarchetypeVersion=2012.01.0.fuse-7-061 -DgroupId=org.fusesource.example -DartifactId=camel-bundle
2. Modifying an Existing Maven Project
(1) Change the package type to bundle
<project .> ... <packaging>bundle</packaging> ... </project>
(2) Add the bundle plug-in to your POM
<project .> ... <build> <defaultGoal>install</defaultGoal> <plugins> ... <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <Bundle-SymbolicName>${project.groupId}.${pro ject.artifactId}</Bundle-SymbolicName> <Import-Package>*</Import-Package> </instructions> </configuration> </plugin> </plugins> </build> ... </project>
(3) Customize the JDK compiler version
<project .> ... <build> <defaultGoal>install</defaultGoal> <plugins> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> ... </project>
3. Packaging a Web Service in a Bundle
(1) 修改pom.xml文件中的package类型为bundle
(2) 添加CXF 运行需要的依赖:org.apache.cxf.bundle.
<project .> ... <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> ... <Require- Bundle> org.apache.cxf.bundle </Require-Bundle> ... </instructions> </configuration> </plugin> </plugins> </build> ... </project>
(3) 添加需要的Import-Package:
<project .> ... <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> ... <Import-Package> javax.jws, javax.wsdl, javax.xml.bind, javax.xml.bind.annotation, javax.xml.namespace, javax.xml.ws, META-INF.cxf, META-INF.cxf.osgi, org.apache.cxf.bus, org.apache.cxf.bus.spring, org.apache.cxf.bus.resource, org.apache.cxf.configuration.spring, org.apache.cxf.resource, org.apache.cxf.jaxws, org.springframework.beans.factory.config, * </Import-Package> ... </instructions> </configuration> </plugin> </plugins> </build> ... </project>
4. Bundle 解析依赖问题
常见的问题有下面几个:
(1) Required features or bundles are not installed
(2) Import-Package header is incomplete,主要注意下面几点:
A. 确保 Import-Package中包含*
B. Maven bundle plug-in无法计算出动态依赖
C. Maven bundle plug-in无法计算META-INF/spring/下面的XML配置文件中所需的依赖
D. Maven bundle plug-in可以计算出OSGI-INF/blueprint下面的XML配置文件中所需的依赖
解决上述两个依赖问题的步骤:
(1) 检查已经安装的Bundles和Festures:osgi:list,features:list
(2) 安装但不启动Bundle:
karaf@root> osgi:install MyBundleURL #生成Bundle Id:218
(3) 使用下面的命令确保动态导入:
karaf@root> dev:dynamic-import 218
(4) 解析Bundle:
karaf@root> osgi:resolve 218
(5) 获取该Bundle所需的完整Import-Package:
karaf@root> package:imports 218
(6) 将上一步生成的Import-Package结果Copy至POM文件中的Maven bundle plug-in中的Import-Package处,
重新打包工程并安装。
5. Deploying Features
Fuse ESB Enterprise提供了一个灵活的部署单元:featurs,用于部署多个Bundle.
(1) Creating a Feature:按照下面的步骤进行。
A. Create a custom feature repository
创建文件:C:\Projects\features.xml
<?xml version="1.0" encoding="UTF-8"?> <features name="CustomRepository"> </features>
B. Add a feature to the custom feature repository
<?xml version="1.0" encoding="UTF-8"?> <features name="MyFeaturesRepo"> <feature name="example-camel-bundle"> <bundle>file:C:/Projects/camel-bundle/target/camel-bundle-1.0-SNAPSHOT.jar </bundle> </feature> </features>
检查系统中已经有的feature:
karaf@root> features:refreshUrl
karaf@root> features:list
karaf@root> features:list | grep example-camel-bundle
C. Add the local repository URL to the features service
features:addUrl file:C:/Projects/features.xml
检查Features URL:
karaf@root> features:listUrl
D. Add dependent features to the feature
<?xml version="1.0" encoding="UTF-8"?> <features name="MyFeaturesRepo"> <feature name="example-camel-bundle"> <bundle>file:C:/Projects/camel-bundle/target/camel-bundle-1.0-SNAPSHOT.jar </bundle> <feature version="7.0.0.fuse-060">camel-core</feature> <feature version="7.0.0.fuse-060">camel-spring-osgi</feature> <feature version="7.0.0.fuse-060">servicemix-camel</feature> </feature> </features>
E. Add OSGi configurations to the feature
<?xml version="1.0" encoding="UTF-8"?> <features name="MyFeaturesRepo"> <feature name="example-camel-bundle"> <config name="org.fusesource.fuseesb.example"> prefix=MyTransform </config> </feature> </features>
下面Spring配置文件中的${prifix}将被替换成"MyTransform":
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ctx="http://www.springframework.org/schema/context" xmlns:osgi="http://camel.apache.org/schema/osgi" xmlns:osgix="http://www.springframework.org/schema/osgicompendium" .> ... <bean id="myTransform" class="org.fusesource.fuseesb.example.MyTransform"> <property name="prefix" value="${prefix}" /> </bean> <osgix:cm-properties id="preProps" persistentid="org.fusesource.fuseesb.example"> <prop key="prefix">DefaultValue</prop> </osgix:cm-properties> <ctx:property-placeholder properties-ref="preProps" /> </beans>
(2) Deploying a Feature
A. Installing at the console
karaf@root> features:refreshUrl
karaf@root> features:install example-camel-bundle
B. Uninstalling at the console
karaf@root> features:uninstall example-camel-bundle
C. Hot Deploy
Copy Featurs Repository 至Fuse ESB Enterprise 的安装目录下的deploy目录下。
D. Adding a feature to the boot configuration
编辑/etc/org.apache.felix.karaf.features.cfg配置文件中的featuresRepositories和featuresBoot值,添加自定义的
Feature Repository.
6. Example:Generating and Running an EIP Bundle
(1)
mvn archetype:generate -DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-camel-osgi-bundle -DarchetypeVersion=2012.01.0.fuse-7-061 -DgroupId=org.fusesource.example -DartifactId=camel-bundle
(2) mvn clean install
(3) osgi:install -s file:/home/fdc/temp/mvn/camel-bundle/target/camel-bundle-1.0-SNAPSHOT.jar
(4) 输出:
>>>> MyTransform set body: Sat Jul 14 11:05:09 CST 2012
>>>> MyTransform set body: Sat Jul 14 11:05:11 CST 2012
>>>> MyTransform set body: Sat Jul 14 11:05:13 CST 2012
7. Generating and Running a Web Services Bundle
(1)
mvn archetype:generate -DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-cxf-code-first-osgi-bundle -DarchetypeVersion=2012.01.0.fuse-7-061 -DgroupId=org.fusesource.example -DartifactId=cxf-code-first-bundle
(2) 编辑生成工程的POM文件,给<Import-Package>元素添加:*
(3) mvn clean install
(4) osgi:install -s file:/home/fdc/temp/mvn/cxf-code-first-bundle/target/cxf-code-first-bundle-1.0-SNAPSHOT.jar
(5) 查看WSDL文件:
http://localhost:8181/cxf/PersonServiceCF?wsdl
发表评论
-
使用Maven构建JBI组件
2012-08-29 18:06 12091. 配置POM文件 <pluginR ... -
JBI及相关组件理论
2012-08-28 12:42 11011. Java Business Integration(JB ... -
部署JBI组件至Fuse ESB Enterprise Runtime
2012-08-28 10:20 1347JBI Endpoint Cluster ... -
OSGi容器中Bundle之间Asynchronous Communication
2012-07-20 09:41 1637Fuse ESB Enterprise Contai ... -
OSGi容器中Bundle之间Synchronous Communication
2012-07-14 11:25 1279OSGi Core定义了一个服务层,提供了一个Bund ... -
Fuse ESB Enterprise之WAR部署模型
2012-07-12 09:48 13051. Build a WAR Modifying ... -
Fuse ESB Enterprise之FAB部署模型
2012-07-11 08:13 1593FAB Project是以pom.xml配置文件为主进行该JA ... -
FuseESB Enterprise 系统配置
2012-05-22 15:42 1729Fuse ESB Enterprise 使用Felix 实现的 ... -
FuseESB Enterprise Runtime 配置
2012-05-19 16:46 13920. FuseESB作为系统服务 (1) Ge ... -
FuseESB Enterprise Routing and Integration理论
2012-05-19 12:49 1055Fuse ESB Enterprise的内嵌的routing ... -
FuseESB Enterprise Messaging理论
2012-05-18 15:11 10191. The Embedded Messaging Servi ... -
ServiceMix中部署:WebService和OSGi Service
2012-02-04 22:47 1365部署Web Service 1. 2. 部署OSGi ... -
ServiceMix中部署:JAR和WAR
2012-02-04 14:34 1725部署JAR: 1. Transform a non-OSGi ... -
ServiceMix中部署:OSGi Bundle和Feature
2012-02-04 11:49 4208部署单个Bundle: 1. Hot Deployment ... -
Maven管理ServiceMix工程
2012-02-03 20:50 15041. 添加fusersource respository至se ... -
FuseESB Enterprise理论及架构思想
2012-01-31 12:01 1194官方对FuseESB的定义: Fuse ESB is an ... -
FuseESB Enterprise/ServiceMix安装配置
2012-01-31 10:45 2603ServiceMix安装配置: 1. 安装准备 a ...
相关推荐
Fuse ESB 4.3.1 个人使用 笔记
fuse esb 详细配置,开发。camel,activemq,osgi深入浅出。
介绍了主流商业和开源ESB的发展趋势、可借鉴的地方和其缺点。主要介绍开源的。 ... 2.ServiceMix/FUSE ESB 3.Oracle Service Bus 4.Jboss ESB 4.WebSphere Message Broker 5.Synapse/WSO2 ESB
官网下载实在太慢.................
官网下载实在太慢.................
保险丝 JBoss Fuse是一个开源ESB,在单个集成发行版中具有基于Apache Camel,Apache CXF,Apache ActiveMQ,Apache Karaf和Fabric8的功能。
对商业、开源企业服务总线产品进行比较: 主要内容: 介绍了主流商业和开源ESB的发展趋势、可借鉴的地方和其缺点。 主要介绍: Oracle Service Bus WebSphere Message ... ServiceMix/FUSE ESB Synapse/WSO2 ESB
该项目包含您可以部署的JBoss BRMS和JBoss Fuse OSGi示例。 下载并编译项目 克隆项目或下载并解压缩。 使用maven编译 ``` $ cd brms-fuse-osgi-examples $ mvn clean install ``` 在RedHat JBoss Fuse上下载并...
同时Karaf作为一款成熟而且优秀的OSGi运行环境以及容器已经被诸多Apache项目作为基础容器,例如:Apache Geronimo, ApacheServiceMix, Fuse ESB,由此可见Karaf在性能,功能和稳定性上都是个不错的选择。
同时Karaf作为一款成熟而且优秀的OSGi运行环境以及容器已经被诸多Apache项 目作为基础容器,例如:Apache Geronimo, Apache ServiceMix, Fuse ESB,由此可见Karaf在性能,功能和稳定性上都是个不错的选择.
Spring微服务保险丝
主要内容: 介绍了主流商业和开源ESB的发展趋势、可借鉴的地方和其缺点。 主要介绍: Oracle Service Bus WebSphere Message Broker Mule ServiceMix/FUSE ESB Synapse/WSO2 ESB
Hello Keith 使用 JBoss Fuse ESB、JBoss Fuse MQ 和 Fabric 构建高度可扩展的消息传递解决方案的示例。 该示例将展示如何使用 Fabric 创建多个容器以动态扩展和发现 ESB 内的服务。 该示例将展示如何使用自定义...
介绍了主流商业和开源ESB的发展趋势、可借鉴的地方和其缺点。 主要介绍: Oracle Service Bus WebSphere Message Broker Mule ServiceMix/FUSE ESB Synapse/WSO2 ESB
fuse esb 第二部分。总共分割了五分
#Camel Helloworld 保险丝在 jboss-fuse-6.1.0.redhat-379 上测试##部署(普通保险丝) 可以通过多种方式部署到普通保险丝(无织物)中: ###通过部署文件夹这假设您的容器上已经运行了骆驼功能cp target/camel-...
本文仅针对Fuse(熔断器)选型,PPTC&CPTC及其他过流保护装置或电路不在其列。针对Fuse设计选型相关基础知识介绍及选型参考标准、选型方法介绍等内容。
Fuse React是用React钩子编写的(React的新特性允许您在不编写类的情况下使用状态和其他React特性)。 Fuse React是一个完整的React管理模板,遵循谷歌的材料设计指南。 Fuse React管理模板使用Material UI V5作为...
fuse的最新版本,fuse是用户自己空间上的文件系统,
Fuse应用市场之手机市场,重点介绍FUSE在手机市场上应用案例~