You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by mcheung63 <mc...@hotmail.com> on 2013/10/18 17:42:57 UTC

回覆: 回覆: adopt to OSGi

if my app need to embed other server without official bundle release, i think it is easier for me to stay my host app outside felix.

correct me if i am wrong.


thanks
from Peter

-------- 原有訊息 --------
由: Robert Munteanu <ro...@apache.org>
日期: 2013-10-18  23:34  (GMT+08:00)
至: users@felix.apache.org
主題: Re: 回覆: adopt to OSGi

On Fri, Oct 18, 2013 at 6:29 PM, mcheung63 <mc...@hotmail.com> wrote:
> thank you Christian.
>
> if i let felix to start my app, seems not many people doing in this way. i think embedding felix is my best choice.

What makes you say that?

Robert

>
>
> thanks
> from Peter
>
> -------- 原有訊息 --------
> 由: Christian Schneider <ch...@die-schneider.net>
> 日期: 2013-10-17 21:14  (GMT+08:00)
> 至: users@felix.apache.org
> 主題: Re: adopt to OSGi
>
> Am 17.10.2013 06:31, schrieb Peter Cheung:
>> Dear All    I have a app, which is a debugger, it works with qemu and bochs. I am planning to support more VM, so I want to independent the middle part to OSGi. I am not sure i am doing it correctly:
>> 1) I changed my app to start felix immediately after main(), in the activator, i create a new object which is the original app. So my original app is running inside OSGi container completely, this will let me avoid class-casting error.
> Why are you starting felix inside you main? Wouldn′t it make more sense
> to just start felix from the shell and let it run your application? Or
> do you need parts of your application to be non OSGi?
>> 2) I got two new projects : Interface project and Impl project. The interface project doesn't have to be a bundle. Both host app and impl project just include it in maven. Is it the best practice? or I have to make it as a bundle? but i don't see advantage.
> It depends on where the interface is needed. If you only need it in OSGi
> then make it a bundle. If you need the interface to communicate between
> OSGi and th main() then you have to make it a normal maven dependency
> for your starter and export the package of the interface using a system
> package export. This is the only way to share code between OSGi and non
> OSGi parts of your app. Btw. the impl bundle has to have an
> Import-Package for the interface package of course.
>
> Christian
>> Thanksfrom Peter
>
>
> --
>
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org