简体   繁体   English

开始使用osgi + felix

[英]getting started with osgi + felix

Which packages of Felix do I need to get started? 我需要开始使用哪些Felix软件包? There are a zillion of them on the downloads page . 下载页面上有很多它们。

(ps is the name a reference to the Odd Couple + in contrast to OSGI's "Oscar" reference framework? this occurred to me after reading one of the tutorial pages & I got a chuckle out of it.) (ps是Odd Couple +的参考名称,与OSGI的“Oscar”参考框架形成鲜明对比?在阅读其中一个教程页面之后,我想到了这一点,我从中得到了一个笑声。)

You just need to download the "main" distribution at: 您只需要在以下位置下载“主要”发行版:
http://apache.mirror.clusters.cc/felix/felix-1.8.0.tar.gz (it is the first download link) http://apache.mirror.clusters.cc/felix/felix-1.8.0.tar.gz (这是第一个下载链接)

Unzip it, enter in the felix-1.8.0 directory and type 解压缩,输入felix-1.8.0目录并输入
$ java -jar bin/felix.jar $ java -jar bin / felix.jar

The Felix console will appear, type "help" to get started 将出现Felix控制台,输入“help”开始

My answer is not really about "how to", but about "where" to look. 我的回答并不是关于“如何”,而是关于“在哪里”看。

I highly recommend OSGi and Apache Felix 3.0 Beginner's Guide by Walid Joseph Gédéon. 我强烈推荐WalidJosephGédéon撰写的OSGi和Apache Felix 3.0初学者指南。 I was using Equinox but after this book switched to Felix, it is just so well written. 我使用的是Equinox,但在本书改为Felix之后,它写得非常好。

Regarding felix bundles I am most commonly running Gogo Comman+Runtime+Shell, iPOJO, Log and Http (jetty/whiteboard). 关于felix捆绑包我最常用的是Gogo Comman + Runtime + Shell,iPOJO,Log和Http(jetty / whiteboard)。

PS: Just to add another book, that I think will become a classic - OSGI in Action . PS:只是要添加另一本书,我认为这将成为经典 - OSGI in Action You can buy early access from manning. 您可以从曼宁购买早期访问权限。 In combination with the Official OSGI Specs this will lay a solid foundation. 结合官方OSGI Specs,这将奠定坚实的基础。

Actually this depends on what you are going to achieve. 实际上,这取决于你将要实现的目标。 You can start with main Felix distribution, it already contains OSGi Bundle Repository implementation , so you will be able to download and start other Felix bundles. 您可以从主Felix发行版开始,它已经包含OSGi Bundle Repository 实现 ,因此您将能够下载并启动其他Felix包。

Contrary, you can download and run Felix (or other OSGi implementations) using Pax Runner , you can control which sets of OSGi bundles to run easily. 相反,您可以使用Pax Runner下载并运行Felix(或其他OSGi实现),您可以控制哪些OSGi包可以轻松运行。

There is also a way to start Felix with ServiceMix Kernel (called Karaf), it is based on Felix, but contains more bundles and supports hot deployment 还有一种方法可以使用ServiceMix Kernel (称为Karaf)启动Felix,它基于Felix,但包含更多捆绑包并支持热部署

Felix main (the System bundle - level 0) will always be there & active. Felix main(系统包 - 级别0)将始终存在且处于活动状态。 For the rest it can be completely random, but there's the compendium bundles which are there for convenience purposes. 对于其余部分,它可以是完全随机的,但是出于方便的目的,存在汇编捆绑包。 The compendium bundles were defined by the OSGi alliance as part of the R4 spec. 作为R4规范的一部分,OSGi联盟定义了汇编捆绑。

I'm also new on OSGi. 我也是OSGi的新手。 I found this page quite helpful on different ways of using Felix. 我发现这个页面对使用Felix的不同方式非常有帮助。 it shows that you don't need to use any 'compendium' or other bundles. 它表明您不需要使用任何“纲要”或其他捆绑包。

Personally i like 'Declarative Services' compendium bundle (called SCR like in org.apache.felix.scr-1.0.8.jar) it makes true service architecture possible. 我个人喜欢'声明服务'纲要包(在org.apache.felix.scr-1.0.8.jar中称为SCR),它使真正的服务架构成为可能。 There's also iPOJO, spring-DM etc. but its DS for me 还有iPOJO,spring-DM等,但它的DS适用于我

You can read about compendium bundles in the OSGI R4 spec. 您可以在OSGI R4规范中阅读有关纲要包的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM