JBoss Community

Re: Weld-OSGi integration in AS7

created by Ales Justin in JBoss AS7 Development - View the full discussion

Good question.


I agree with you on the "surprise" from a CDI user,

which expects its beans to be available at runtime, since validation "said" so.


What we could do is add a dependency on a OSGi bundle from a CDI deployment which uses some bundle's service.

This should / would be transparently added via Weld/OSGi+AS integration,

which would then also unwind the CDI deployment if the required OSGi service would go away.

(and could potentially re-wind it back, if the service came back)


This might again be an over-kill, but I don't see how else you can properly handle this from CDI side.


Otoh, OSGi side could easily live with dynamic CDI beans, as this is what it already does.

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community