Extending Virgo with a HttpService

Extending Virgo with a HttpService
Posted on 29th March 2011 by Chris Frost Several people have asked about us providing a packaging of Virgo that includes the OSGi HttpService. We don’t have any plans to do so because it’s so easy to extend Virgo with extra function yourself. I’m using the Equinox HttpService as the desired extra function here but the same approach applies no matter what you want to extend Virgo with.

All you need is the latest Virgo Kernel download, the Equinox HttpServer jar and it’s dependency the Servlet API jar. Unzip the Kernel and copy the two jars in to one of the repos. You have a choice of ‘repository/ext’ or ‘repository/usr’.

In this case ‘ext’ is the better choice as these bundles are being used to extend the core functionality of Virgo. If they were dependencies of an application then ‘usr’ would be the better choice.

There are two configuration files to edit.

■The ‘config/org.eclipse.virgo.kernel.userregion.properties’ file. At the very bottom, specify an additional initial artifact. The artifacts listed here will be started before any applications are installed. We need to list the Equinox HttpService bundle. The value is comma separated so after adding the new bundle you should have something like.
initialArtifacts =
repository:plan/org.eclipse.virgo.kernel.userregion.springdm,
repository:bundle/org.eclipse.equinox.http
■The HttpService requires some configuration itself, it needs to know which port to run on. This is given with the ‘org.osgi.service.http.port’ property and can be specified in the ‘lib/org.eclipse.virgo.kernel.launch.properties’ file.
org.osgi.service.http.port=8080
That’s all there is to it, start the kernel up and before any applications are installed the HttpService will be available. This is the same approach that should be used to extend Virgo in any other way and is exactly how the Tomcat and Jetty packages of Virgo are constructed. If you have extended Virgo in some way, let us know.
This entry was posted in Eclipse, OSGi, Virgo by Chris Frost. Bookmark the permalink.
内容概要:本文详细介绍了利用MATLAB进行信号与系统实验的具体步骤和技术要点。首先讲解了常见信号(如方波、sinc函数、正弦波等)的生成方法及其注意事项,强调了时间轴设置和参数调整的重要性。接着探讨了卷积积分的两种实现方式——符号运算和数值积分,指出了各自的特点和应用场景,并特别提醒了数值卷积时的时间轴重构和步长修正问题。随后深入浅出地解释了频域分析的方法,包括傅里叶变换的符号计算和快速傅里叶变换(FFT),并给出了具体的代码实例和常见错误提示。最后阐述了离散时间信号与系统的Z变换分析,展示了如何通过Z变换将差分方程转化为传递函数以及如何绘制零极点图来评估系统的稳定性。 适合人群:正在学习信号与系统课程的学生,尤其是需要完成相关实验任务的人群;对MATLAB有一定基础,希望通过实践加深对该领域理解的学习者。 使用场景及目标:帮助学生掌握MATLAB环境下信号生成、卷积积分、频域分析和Z变换的基本技能;提高学生解决实际问题的能力,避免常见的编程陷阱;培养学生的动手能力和科学思维习惯。 其他说明:文中不仅提供了详细的代码示例,还分享了许多实用的小技巧,如如何正确保存实验结果图、如何撰写高质量的实验报告等。同时,作者以幽默风趣的语言风格贯穿全文,使得原本枯燥的技术内容变得生动有趣。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值