Class ContextResource

java.lang.Object
com.zfabrik.resources.provider.Resource
com.zfabrik.impl.springframework.ContextResource
All Implemented Interfaces:
IDependencyComponent

public class ContextResource extends Resource implements IDependencyComponent
Singleton resource abstraction for a spring application context.

This resource implements components of type org.springframework.context.

A context may be used to supply beans to exposure via bean components (see BeanResource) or simply as standalone contexts started by a system state participation (see ISystemState).

Supported configuration properties:

context.contextConfigLocation
Defines where to look for the context. If prefixed by classpath:, the project's java component will be searched using a ClassPathXmlApplicationContext.
Otherwise the location will be supplied to FileSystemXmlApplicationContext and it will be search relative to the component's resource folder.

As an example, a context declaration may look like this:

 com.zfabrik.component.type=org.springframework.context
 #
 # actually defined.
 #
 context.contextConfigLocation=classpath:META-INF/applicationContext