In this section we'll discuss the integration of OSWorkflow with the Spring lightweight object container.
Spring is an object container, specifically an Inversion of Control (IoC) container. IoC containers manage their component's dependencies and lifecycle. Component dependencies are managed declaratively via injection. This way each component only knows its dependency interface but not its implementation. The implementation is the one instantiated by the container and set to the component as an interface, so you don't need to create new object dependencies inside your code. This means no more use of the new
keyword in Java.
Spring uses the concept of a BeanFactory. This BeanFactory is an application-wide registry and manages components. It is responsible for instantiating and injecting objects and their dependencies.
OSWorkflow can be integrated with the Spring container as a bean in the BeanFactory. In this way you can declaratively...