W-JAX: OSGi
Englische Zusammenfassung der Key-Note von Peter Kriens
Why OSGi (Open Services Gateway Initiative) ?
- Wire components together, not only beans or such
- Manage these components
What is OSGi?
In this case not the alliance but the specification and the API for a component framework - actually it is a SPI including the test cases. You can feel free and provide your own implementation - the interfaces are all in Java. You might have heard of Equinox as the Eclipse implementation.
What does it have in stock for you?
- Register services (which are basically interfaces)
- Bind implementations to a service
- Find a service (or more precisely the bound implementation)
- Listeners on service binding and unbinding
Component Life Cycle
- install
- start
- stop
- update
- uninstall
You can react on any life cycle update and do what you need to do, e.g. allocate a connection pool on install, free it on uninstall, etc.