deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@gmail.com>
Subject Fwd: CDI annotations in OSGi
Date Thu, 29 Mar 2012 21:44:29 GMT
Has anyone seen this before?  Wonder if it might make sense as a DeltaSpike component.


-David

Begin forwarded message:

> From: David Bosschaert <david.bosschaert@gmail.com>
> Subject: Re: CDI annotations in OSGi
> Date: March 29, 2012 2:23:58 PM PDT
> To: dev@aries.apache.org
> Reply-To: dev@aries.apache.org
> 
> FYI - something like this has also been implemented in the Weld-OSGi
> project: https://github.com/mathieuancelin/weld-osgi
> 
> Best regards,
> 
> David
> 
> On 29 March 2012 16:02, David Blevins <david.blevins@gmail.com> wrote:
>> 
>> On Mar 25, 2012, at 9:01 AM, David Jencks wrote:
>> 
>>> Getting OWB to work in a plain osgi environment should not be too hard.  I think
the CDI annotation model is a lot better in all ways than blueprint.
>>> 
>>> I think what's missing is the connection to OSGI services.  To be more than a
self-contained set of components with no relationship to anything outside the bundle you need
a way to consume osgi services from CDI components and expose CDI beans as services.  I haven't
seen a proposal on how to do this.
>> 
>> A CDI Extension should be able to export all the services from OSGi into CDI.  The
extension could easily export too, if you wanted.
>> 
>> Rick Hightower wrote a bi-directional CDI/Spring bridge using that technique.  Should
be illuminating for bridging OSGi and CDI:
>> 
>>  http://rick-hightower.blogspot.com/2011/04/spring-meet-cdi-cdi-meet-spring.html
>> 
>> 
>> -David
>> 
>>> 
>>> On Mar 25, 2012, at 3:13 AM, Christian Schneider wrote:
>>> 
>>>> Found a newer thread.
>>>> http://openejb.979440.n4.nabble.com/OSGi-Work-td4223311.html
>>>> 
>>>> Seems a lot has improved since the first thread I found. I will try to get
this running and report on what I have found. Perhaps Charles can also comment on this as
he seems to be one of the drivers behind the efforts on the openejb side. I am not sure if
he watches this list. I will also ask on the openejb list.
>>>> 
>>>> Christian
>>>> 
>>>> Am 25.03.2012 12:04, schrieb Christian Schneider:
>>>>> That would be ideal of course. Does anyone know if openejb could be used
for this?
>>>>> 
>>>>> I found this page which shows how to use openejb in OSGi:
>>>>> https://cwiki.apache.org/OPENEJB/osgi-openejb.html
>>>>> 
>>>>> and I found an interesting thread:
>>>>> http://openejb.979440.n4.nabble.com/OpenEJB-and-OSGi-td981781.html#a981782
>>>>> 
>>>>> So this sounds like it would work but not that nicely. You have to require
the openejb bundle and you have to use an Activator.
>>>>> Ideally I would like this to work like blueprint. Where you have an extender
that finds the trigger (META-INF/beans.xml) and initializes the bundle accordingly.
>>>>> Additionally it seems that openejb seems to have some dependencies on
eclipse RCP bundles which is not good for a server deployment.
>>>> 
>>>> --
>>>> 
>>>> Christian Schneider
>>>> http://www.liquid-reality.de
>>>> 
>>>> Open Source Architect
>>>> Talend Application Integration Division http://www.talend.com
>>>> 
>>> 
>> 


Mime
View raw message