servicemix 教程能部署jsp吗

4951人阅读
该文章算是笔记,针对的是apache-servicemix-4.5.3相配套的qucikstart.pdf文档。
启动servicemix:运行 &apache-servicemix-4.5.3\bin&文件夹下面的servicemix.bat,弹出ServiceMix的控制台,在这个控制台上可以增加或删除bundles,安装各种可选的特性。
查看已经安装的bundles:运行 osgi:list& 命令
查看日志:运行 log:display 命令
只查看异常日志:运行 log:display-exception 命令
设置日志级别:运行 log:set DEBUG 命令(以DEBUG举例)
查看某个级别的日志:运行 log:display | grep DEBUG(以DEBUG举例)
查看可用的功能组件:运行 feature:list 命令
查看某个类别的可用功能组件:运行 feature:list | grep camel (以camel举例)
安装某个功能组件:运行 feature:install webconsole (以webconsole举例)
&&& webconsole是网页版的管理客户端,URL为: ,用户名/密码:smx/smx
简单示例:使用Camel
Apache Camel是一个开源的、功能丰富的应用集成框架,它支持常见的EIP模式,是一个强大的基于规则的路由引擎,可以轻松的实现消息路由和消息转换,ServiceMix对Camel进行了深度集成来支持各种复杂的ESB功能。
本例中实现一个非常简单的路由功能:将文件从 camel/input 文件夹移到 camel/output 文件夹。
1、创建路由配置文件study_one.xml (camel支持两种风格的路由配置文件,一种是针对blueprint容器的,一种是针对spring容器的,这里用的是blueprint)
&?xml version=&1.0& encoding=&UTF-8&?&
&blueprint xmlns=&http://www.osgi.org/xmlns/blueprint/v1.0.0& xmlns:xsi=&http://www.w3.org/2001/XMLSchema-instance&
xsi:schemaLocation=&
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd&&
&camelContext xmlns=&http://camel.apache.org/schema/blueprint&&
&!--camel采用URI来描述各种组件,如file:表示文件,http:表示web,activemq:表示消息队列--&
&from uri=&file:camel/input&/&&!--文件路由的起始文件夹--&
&log message=&Moving ${file:name} to the output directory&/&&!--文件路由时需打印的日志内容--&
&to uri=&file:camel/output&/&&!--文件路由的终点文件夹--&
&/camelContext&
&/blueprint&
2、发布和启动路由
第一步:将study_one.xml移到ServiceMix下的deploy文件夹下,该文件将会被ServiceMix加载和发布。
第二步:转到ServiceMix根目录,会发现新创建了一个camel/input 文件夹。
第三步:向camle/input文件夹下copy任一文件,然后到camel/output下查看,会发现copy的同时文件被传递到了ouput下面,说明路由生效了。
第四步:查看日志,运行log:display命令,将会发现被路由文件的相关信息。
3、管理路由
第一步:查找study_one.xml路由文件对应的bundle。运行osgi:list,从运行结果中查找study_one.xml,截图如下:
从截图中可知该路由对应的bundle id是181,Blueprint Container被创建出来用于启动这个路由(如果用的是spring配置文件,则Spring那一些会显示Started)。
第二步:终止路由。运行osgi:stop 181,将路由终止,向camel/input下copy一个文件,然后到camel/output下查看,文件未被移过来,说明终止成功。
第三步:开启路由。运行osgi:start 181,去camel/output下查看,第二步未被移动的文件被移到了该文件夹下,说明启动成功。
使用ActiveMQ
1、创建第一个路由,该路由将activemq/input文件夹下的文件路由到atvive/output文件夹下,创建的原理及步骤同上。
其中配置文件study_MQ1.xml的内容如下:
&?xml version=&1.0& encoding=&utf-8&?&
&blueprint
xmlns=&http://www.osgi.org/xmlns/blueprint/v1.0.0&
xmlns:xsi=&http://www.w3.org/2001/XMLSchema-instance&
xsi:schemaLocation=&
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd&&
&camelContext xmlns=&http://camel.apache.org/schema/blueprint&&
&from uri=&file:activemq/input&/&
&to uri=&file:activemq/output&/&
FileMovedEvent(file: ${file:name}, timestamp: ${date:now:hh:MM:ss.SSS})
&/setBody&
&to uri=&activemq://events& /&
&/camelContext&
&/blueprint&
该文件和上面study_one.xml最大的区别在于,该文件对应的路由不再直接记录move日志,而是将待记录的日志内容以消息的方式发送到MQ中。
2、创建第二个路由,该路由负责从MQ中去数据,然后将数据move到日志中去。
其中配置文件study_MQ2.xml的内容如下:
&?xml version=&1.0& encoding=&utf-8&?&
&blueprint
xmlns=&http://www.osgi.org/xmlns/blueprint/v1.0.0&
xmlns:xsi=&http://www.w3.org/2001/XMLSchema-instance&
xsi:schemaLocation=&
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd&&
&camelContext xmlns=&http://camel.apache.org/schema/blueprint&&
&from uri=&activemq://events&/&
&to uri=&log:events&/&
&/camelContext&
&/blueprint&
发布好这个路由文件之后,通过log:display命令就可以查看activemq/input对应的日志信息了。
MQ最大的特点就是发送数据一方和取数据的一方是完全透明,两者之间不需要建立连接。当study_MQ2.xml的路由关闭的时候如果向activemq/input中copy文件,日志信息照样会传到MQ中,当MQ2启动的时候它照样会取到这些信息。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:408848次
积分:3818
积分:3818
排名:第5544名
原创:69篇
转载:25篇
评论:135条
(1)(2)(2)(7)(2)(1)(2)(1)(3)(7)(4)(1)(1)(2)(9)(22)(15)(8)(4)ServiceMix 4.4.0
Related ProjectsApache Software Foundation
Downloads : Apache ServiceMix 4.4.0
Linux/Mac OS X/Unix Downloads
Windows Downloads
Default assembly
Our default assembly is the best way to get started with Apache ServiceMix.
Source assembly
Use this if you want to build Apache ServiceMix from source yourself
Full assembly
Use this if you want to run Apache ServiceMix on a server that does not have an internet connection
JBI assembly
Use this if you're migrating from ServiceMix 3.x or if you want to reuse your existing JBI artifacts
Minimal assembly
Use this if you're an advanced user that wants to create your own edition of Apache ServiceMix at runtime
Documentation
Links to the documentation pages for this version
OSGi components listOSGi/JBI components included in this release:This release packages the following dependencies:Version 1.5.0 of Version
of the JBI componentsVersion
of ServiceMix UtilsVersion 2.2.4 of Version
of Version 2.8.3 of Version 2.4.4 of You can use it together withVersion 4.5 of the Maven pluginsVersion 2011.02 of the archetypesRelease notesSub-task - Extend the help command to display usefull help for all commands available - The option --help on commands doesn't display good enough help - Add complete distribution for offline deployments - Rename existing assembly to apache-servicemix-4.x.0-jbi - Add a basic distribution for new users - Add minimal distribution to allow building any ServiceMix-based distributionBug - Apache ServiceMix 4 binary assembly zip file is not valid - Avoid duplication of config files for NMR and Features assembly build - Command activemq:list, activemq:browse return null - Test failures in SMX4 Features' project on AIX - Files in deploy folder before initial startup are getting deployed before boot features - Camel NMR component WSSecurityTest fails - ServiceMix 4.3.0-fuse-02-00 does not start correctly with fresh unzip on Windows - Components Not Loading Before Routes - Property replacement is broken in camel-blueprint examples - bin/client script missing from Linux distribution - simple example use out-of-date DocumentFactory - artchetypes for servicemix-cxf-code-first-osgi-bundle and servicemix-cxf-code-first-osgi-bundle doesn't work -
omit client script in bin folder - Create OSGi bundle for RJC (Redis Java Client) - ensure some bundle could be installed with OBR resolver - wsdl4j bundle shouldn't import javax.wsdl as itself export it - Simple quartz.xml example caue intermittent exception - the endorsed xml-api jar can't correctly load org.apache.xpath.jaxp.XPathFactoryImpl class - Missing class reference in the log:display output - system bundle should export xerces and xalan package as we already endorse those jar - reuse woodstox feature but not list seperate bundle - BOM marker in camel-osgi Spring XML file not handled well on CI server - Not all content of branding.properties is shown - should add org.ops4j.pax.web.config.file properties to etc/org.ops4j.pax.web.cfg - system.properties miss karaf.admin.role property - ServiceMix features depends on non-existent version of geronimo servlet spec. - Build failure when building with a clean maven repository (unable to determine JBI component) - servicemix xstream 1.4.1 bundle incorrectly refer xstream 1.4 - remove saaj feature from add-features-to-repo - distribution kit miss org.apache.karaf.features.obr bundles which cause startup failed - features itests depends on old karaf management jar - rename etc/org.ops4j.pax.web.cfg to etc/org.ops4j.pax.web.cfg.empty.stub - simple/quartz.xml example output doesn't comply with the README - The link to the FuseSource commercial documentation is broken - examples won't build with clean Maven local repo - jbi kit miss servicemix-exec jar - Information in README is out-of-date - Missing information in NOTICE file - add war to the featuresBoot for full and the regular distro to avoid potential exceptions - remove org.apache.cxf.ws.rm.v200702 package from cxf-ws-rm exampleh3.Improvement - The help of the shell commands is wrong or not sufficient and needs improvement - Update Feature file of SMX4 to use HTTP feature of karaf and same version of jetty as camel feature file - Cleanup POMs and provide a better build - Use Camel feature - Improve features.xml to leverage OBR improvements in Karaf - Create bundle for jSch 0.1.44 - Update POMs to Maven3 - Consider dropping commons-logging for standard Java.util.logging - specify camel feature bundle start level less than 60 - add configuration stub file for SSL pax-web suport for ease of users - Provide assembly in JAR packaging as well - Upgrade to Jetty 7.3.1.v - Rework the smx4 build to have better dependency handling - Upgrade to ActiveMQ 5.5.1 - Make allowCoreThreadTimeOut name consistent across mbeans and properties - Support run as subject for Camel NMR endpoint - Support run as subject for CXF NMR endpoint - Ensure OBR support is available before boot features are installed - use the latest xerces to replace the jaxp-ri-1.4.4 to resolve cocurrent issue - update a set of bundle version - use features.xml from cxf - Ignore the sun saaj package from the org.osgi.framework.bootdelegation - Ignore the sun jaxb package from the org.osgi.framework.bootdelegation - camel-cache ehcache cache repilication using ehcache-jmsreplication - Upgrade FreeMarker to 2.3.16 - upgrade to cxf 2.4.0 - Support timeout property on Camel NMR endpoints - Upgrade FreeMarker to 2.3.17 - Upgrade FreeMarker to 2.3.18 - Upgrade to Jetty 7.4.1.v - Add 'karaf-framework' to boot features to avoid uninstalling core Karaf bundles - add avalon-framework-api bundle - create avalon-framework-impl bundle - upgrade to jetty 7.4.2.v - ">>>> JavaDSL set body:" displayed but not noted in the Camel/OSGi example's README.txt file - README.txt file incomplete for "simple" example in regards to the wsn.xml file. - create wrap bundle for axiom API and Impl 1.2.12 - specify start-level as 50 for default installed jbi component features which ensure jbi component related bundle can get started before customer bundles when restart OSGi container - Alter packaging options to better reflect common use cases - xerces and xalan SPI factory package should be added in custom.properties org.osgi.framework.bootdelegation - add camel-blueprint as default installed feature - install activemq-web-console feature should work out of the box - use system properties to define activemq url - add activemq-spring feature to featuresBoot - should ship servlet api 2.5 but not servlet api 3.0 - Sample project module elements are missing from top-level POM. - features.xml should reuse jetty feature from karaf - Refactor features build to be independent of NMR build - Camel NMR producer is not registered with its keyName but using the UUID - Monitor etc/activemq-broker.xml for changes - Add a name attribute to the features descriptors - extract servicemix-soap and servicemix-soap2 bundle into servicemix-shared feature - Connection refused to embedded broker when starting up - Upgrade to Camel 2.8.3 - add specs feature to featuresBoot list ensure the specs bundle are available in time - Reorganize examples by technology - should add delay to camel timer of
camel-nmr and camel-nmr-blueprint example so that the nmr endpoint get chance to create - create demo using Camel and local ActiveMQ broker - cleanup cxf related examples to remove unnecessary package/resource import and Required-Bundle - enhance cxf-ws-security-osgi example to leverage cxf JAASLoginInterceptor to authenticate against karaf default jaas configuration - Use SLF4J instead of Java standard logging for CXF in SMX - let cxf-ws-rm example use http osgi transportNew Feature - Create OSGi bundle for Perf4j - Add a struts2-core and struts-xwork bundles for SMX project - Provide a convenience POM for usersTask - Switch to use slf4j as logger (instead of commons-logging) - Update to Karaf 2.2.0 - Upgrade to Camel 2.7 - upgrade to cxf 2.3.3 - Update to CXF 2.4.0 - Create JBoss Netty 3.2.4 bundle - Create Bundle for cometd java server 2.1.1 - upgrade karaf version to 2.2.1 - Velocity bundle - Add dynamic imports so the #parse macro can load the resource - Upgrade to Java Mail 1.4.4 - Quartz 2.0.1 bundle - upgrade to cxf 2.4.1 - Upgrade to Karaf 2.2.2 - Release Apache ServiceMix 4.4.0 - Upgrade to Groovy 1.8.0 - Upgrade to Quartz 1.8.5 - Upgrade to Camel 2.8.0 - upgrade to cxf 2.4.2 - upgrade to cxf 2.4.2 - upgrade to jetty 7.4.5.v - Create a scala 2.9.1 bundle - upgrade xmlsec and opensaml bundle version - Upgrade to Camel 2.8.1 - upgrade to spring-dm 1.2.1 - upgrade to cxf 2.4.4 - upgrade to spring 3.0.6 - upgrade axiom version to 1.2.12 - XStream 1.4.2 bundle - use same version of jsr311 as cxf 2.4.4 - add a cxf example with blueprint configuration
svn co http://svn.apache.org/repos/asf/servicemix/smx4/features/tags/features-4.4.0/
ChangelogFor a more detailed view of new features and bug fixes, see theserviceMix 4.4 教程_图文_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
serviceMix 4.4 教程
上传于||文档简介
&&s​e​r​v​i​c​e​M​i​x​ . ​教​程
阅读已结束,如果下载本文需要使用1下载券
想免费下载本文?
下载文档到电脑,查找使用更方便
还剩84页未读,继续阅读
你可能喜欢Mule与Servicemix比较
Servicemix的优点:
1,基于JBI规范;
2,可以热部署;
3,支持Camel(可以用DSL去开发集成流程);
Servicemix的缺点:
1,JBI规范带来了使用上的繁琐,且JBI规范没有得到太多的青睐,前途未卜;
2,过多依赖XML的配置;
3,由于所有消息要进行标准化处理,即生成和解析XML文件,所以会导致性能下降;
4,开发过程中需要实现框架特定接口(MessageExchangeListener)接收和处理上述标准消息,侵入性强;
5,文档不健全、不够清晰;
Mule的优点:
1,架构简单清晰、容易上手;
2,它有非常广泛的传输器、路由器和转换器,且易于扩展;
3,Mule不需将消息转换成统一的格式,而只在需要时进行转换,提高了性能;
4,开发过程中无需关注Mule代码,只需通过配置即可将服务暴露,减少了侵入性;
5,文档清晰而完善;
Mule的缺点:
1,没有实现任何ESB规范(但遵循了《Enterprise Intergration Patterns》与&SEDA (Staged Event-Driven Architecture));
2,不支持热部署(企业版支持);
Mule选择不实现JBI的理由:为保持其轻量级和灵活性,提高效率和易用性。
Mule提供了一个JBI适配器来与JBI容器保持联通性。
综上所述,Mule和Servicemix都实现了ESB的核心功能,都提供了广泛的可用组件和良好的扩展性,从功能上看差别不大,但从稳定性、易用性和性能上比较,Mule可能是更好的选择。
> 本站内容系网友提交或本网编辑转载,其目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如涉及作品内容、版权和其它问题,请及时与本网联系,我们将在第一时间删除内容!
企业应用集成与开源ESB产品ServiceMix和Mule介绍议程o企业对应用集成的内在需求o企业IT设施面临的问题o企业应用集成的架构方案oESB的角色与职责oServiceMix简介–ServiceMix架构–ServiceMix组件概览–ServiceMix实战–DemooMule简介–Mule的工作机理–Mule组件概览–Mule实战–Demo企业对 ...
当谈论整合应用时,消息路由备受关注.当我们确定了各个应用,并选择Mule作为整合平台,也知道在Mule的服务中可以使用哪些Java类和web services处理消息,那么为了让消息正确地在服务间流转,该如何将所有的事情整合在一起,从而确保获得我们所需要的的结果呢? Mule为您的Mule应用中的服务间的路由消息提供了强大而灵活的可选项.本文描述了Mule的 ...
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出版.作者信息和本声明.否则将追究法律责任.http://blog.csdn.net/topmvp - topmvpMost modern business systems include independent applications that exchange information w ...
InfoQ已发布了Tijs Rademakers和Jos Dirksen所著新书&Open Source ESBs In Action&的样章,借此机会,我们对作者在现实项目中使用开源ESB的经验进行了采访. InfoQ:鉴于开源ESB目前的状态,您认为能够把它们看作是商业产品相当的替代品么? Tijs Rademakers (TJ):我曾经有幸 ...
垂直市场解决方案(VMS)是NAVTEQ公司中的一个机构,负责为客户提供定制的解决方案,包括移动门户和导航系统.这些解决方案中包含了NAVTEQ 公司提供的服务以及第三方服务,以客户要求的方式交付组合服务和内容,这些方式包括Web services,WAP,portals等.VMS在响应庞大的销售机会和预见未来客户需求方面面临着一些挑战.为了解决这些挑战就需 ...
这篇文章取自&Open Source ESBs in Action: Example Implementations in Mule and ServiceMix&一书.这部分内容展示了如何通过邮件服务器集成Mule和ServiceMix.在性能和速度无关紧要的情况下,有一种非常容易且具有异步性的应用集成方式:基于邮件的集成.使用POP3和SMT ...
Spring开源项目开始于2003年2月,现在框架正变得越来越强大.目前已经达到了超过一百万的下载量:在很多行业范围内成为事实上的标准:并且改变了企业Java应用的开发过程.最重要的是,它发展了大量而且忠诚的用户,他们理解框架的关键价值并且共享反馈,来帮助框架高速发展.Spring的使命也一直很清晰:提供一种非入侵性编程模型.应用程序的代码应该尽可能地与框架 ...
10月初,InfoQ报道了Oracle欲收购BEA的消息.但最终,这次震惊业界的消息以Oracle的放弃而收场:由于BEA不愿考虑甲骨文的每股17美元收购价,甲骨文于周日[10月28日]宣布抽回67亿美元的收购BEA提议.仅仅半个多月,这个事件就经历了以下几个关键阶段:10月12日,Oracle确认斥资67亿美元欲收购BEA. 因为此事距离SAP收购BI厂商 ...}

我要回帖

更多关于 servicemix 集群 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信