Yes both DS and Blueprint need a runtime. For DS this is just a single
bundle, and for Blueprint (at least the Aries implementation) it is just a
small number of bundles. I do not think it is onerous at all, especially
since most people will already have these installed. And even more so if
you use a resolver such as OBR or R5 resolver, the required runtimes will
simply be added automatically.

I strongly recommend NOT using activators directly. You will write tons
more code and will lose sight of its real intention; it will also be much
harder to test.

Neil

On Thu, Mar 28, 2013 at 2:10 PM, Cristiano Gavião <[email protected]>wrote:

> Yep,
>
> I got this conclusion too.. mix both in same bundle is not good.
>
> What I was trying was to avoid to obligate people to install a runtime
> just because our bundle...
> The only way to do this is return to activators. but that I want to avoid
> too :)
>
>
> 2013/3/28 Neil Bartlett <[email protected]>
>
>> Both will be registered. DS will register the service(s), and Blueprint
>> will also register the service(s). If there are any overlaps then you may
>> get two instances of some services.
>>
>> I don't think it's a very good idea to do this. A more sensible approach
>> to migration would -- I believe -- to have some bundles which are DS-based
>> and some which are Blueprint-based. Mixing together both DS and Blueprint
>> in the *same* bundle probably means that your bundle has poor coherency.
>> Nevertheless, it's perfectly possible.
>>
>> Neil
>>
>>
>> On Thu, Mar 28, 2013 at 1:32 PM, Cristiano Gavião <[email protected]>wrote:
>>
>>> Hey Neil,
>>>
>>> Ok. Suppose I included service definitions (for same service name and
>>> same impl) for both.
>>> My concern is: what could happen if both runtime is installed and active
>>> in the same environment. The framework will fail to register both or only
>>> one service?
>>>
>>> thanks a lot,
>>>
>>> Cristiano
>>>
>>>
>>> 2013/3/28 Neil Bartlett <[email protected]>
>>>
>>>> Yes you can do this without any problems. Just include both the
>>>> Service-Component header for DS, and the blueprint XML files under
>>>> OSGI-INF/blueprint. You will also need both the corresponding runtime
>>>> bundles installed and active. Then it will all "Just Work" (TM).
>>>>
>>>> Neil
>>>>
>>>> On Thu, Mar 28, 2013 at 1:01 PM, Cristiano Gavião 
>>>> <[email protected]>wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I need to osgify an existent API and expose services based on it.
>>>>>
>>>>> There are people that uses Blueprint by default (karaf) and there are
>>>>> people that uses DS (equinox).
>>>>>
>>>>> could I provide both type of services in a same bundle ?
>>>>>
>>>>> and what could happen if the system have both runtime installed ? can
>>>>> I choose one at runtime?
>>>>>
>>>>> thanks for any tip.
>>>>>
>>>>> Cristiano
>>>>>
>>>>> _______________________________________________
>>>>> OSGi Developer Mail List
>>>>> [email protected]
>>>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> OSGi Developer Mail List
>>>> [email protected]
>>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>>
>>>
>>>
>>>
>>> --
>>> "Tudo vale a pena se a alma não é pequena..."
>>> _______________________________________________
>>> OSGi Developer Mail List
>>> [email protected]
>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>
>>
>>
>> _______________________________________________
>> OSGi Developer Mail List
>> [email protected]
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>
>
>
>
> --
> "Tudo vale a pena se a alma não é pequena..."
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to