Mathieu ANCELIN [
http://community.jboss.org/people/mathieu.ancelin] created the
discussion
"Re: Weld-OSGi integration in AS7"
To view the discussion, visit:
http://community.jboss.org/message/605588#605588
--------------------------------------------------------------
Actually, we followed a different approach for Weld-OSGi.
We don't think that it's mandatory to fail a deployment if some OSGi services are
not present (after all, OSGi is dynamic and everything is a matter of services that come
and go).
With Weld-OSGi it's possible to mark an OSGi service injection point as
'Required' to specify that we absolutely need an implementation of that particular
service to work. In this case, it's possible to declare callbacks (via CDI events)
that will be activated when all 'Required' dependencies will be present in OSGi
service registry or when there are missing dependencies. Then, it's possible to handle
cases of mandatory dependencies with these callbacks (start the application when the XYZ
service appears and shut it down when it goes off, etc ...)
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/605588#605588]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]