Class StandaloneProcessingUnitContainerProvider

All Implemented Interfaces:
ClusterInfoAware, BeanLevelPropertiesAware

public class StandaloneProcessingUnitContainerProvider extends ApplicationContextProcessingUnitContainerProvider
A StandaloneProcessingUnitContainer provider. A standalone processing unit container is a container that understands a processing unit archive structure (both when working with an "exploded" directory and when working with a zip/jar archive of it). It is provided with the location of the processing unit using StandaloneProcessingUnitContainerProvider(String). The location itself follows Spring resource loader syntax.

When creating the container a thread is started with StandaloneContainerRunnable. This is done since a custom class loader is created taking into account the processing unit archive structure, and in order to allows using the standlone container within other environments, the new class loader is only set on the newly created thread context.

At its core the integrated processing unit container is built around Spring ApplicationContext configured based on a set of config locations.

The provider allows for programmatic configuration of different processing unit aspects. It allows to configure where the processing unit Spring context xml descriptors are located (by default it uses classpath*:/META-INF/spring/pu.xml). It also allows to set BeanLevelProperties and ClusterInfo that will be injected to beans configured within the processing unit.

For a runnable "main" processing unit container please see StandaloneProcessingUnitContainer.main(String[]).

Author:
kimchy