Perhaps this is too simplistic of an answer, but the static case is a
subset of the dynamic case. Just program your components to depend on
services using something like DS using all static dependencies if your
components cannot handle seeing any dynamism. Thus, the entire
application will either be up and working or down.
That's all there is to it. There is no inherent dynamism in OSGi (other
than at startup time). The only dynamism is that which you create by
manipulating the installed bundles. If you don't want dynamism, the
don't create any.
-> richard
On 2/16/11 12:34, Eugen Reiswich wrote:
Hi folks,
we had today a conversation regarding OSGi with DS for business applications.
The main point of the discussion was: how can I get rid of OSGi dynamics in
applications where I do not need dynamics. For example: in an application for a
savings bank I will NOT start to use hot plugging to add new bundles or remove
existing bundles, start and stop services while customers are transferring
money from one account to another. The point is that in OSGi applications I
have to deal with dynamic behavior of services and bundles although I
explicitly do not want to have this behavior. Declarative services in fact
simplify the service orchestration and concurrency but they still have a
dynamic character.
Moving from a world currently dominated by Spring to an OSGi world the
question arise: how can I ensure in an OSGi application that all
required/mandatory services are satisfied at start up? In applications with
more than a few services the OSGi console is not an appropriate way for this
task.
To give you an example: we are developing a server-side OSGi application which
provides several domain related services: CustomerService, AccountService etc.
When we start our server we do not know whether all service relations are
satisfied and thus all mandatory services are started. Any ideas/best
practices would be appreciated.
Regards,
Eugen
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev