JBoss Community

Re: Weld-OSGi integration in AS7

created by Mathieu ANCELIN in JBoss AS7 Development - View the full discussion

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

Start a new discussion in JBoss AS7 Development at Community