Java Framework with Service Dependencies?

64 Views Asked by At

Is there a Java framework that allows reloading on components (like OSGi) and allows services to have start / stop dependencies (like init scripts)?
OSGi seemingly allows the following operations:

  • install
  • start / stop
  • uninstall

However, the stance of OSGi on runtime dependencies currently seems to be only to avoid them. I would like to be able to specify for example that component A requires that "database service is started".

1

There are 1 best solutions below

0
On

This is trivial (and common) to accomplish in OSGi with Declarative or Blueprint Services, where you declaratively define dependencies between services.

Really, the only thing to be careful of is cyclic dependencies which would cause everything to fail to start.