Package com.zfabrik.impl.springframework
Class ContextResource
java.lang.Object
com.zfabrik.resources.provider.Resource
com.zfabrik.impl.springframework.ContextResource
- All Implemented Interfaces:
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 aClassPathXmlApplicationContext
.
Otherwise the location will be supplied toFileSystemXmlApplicationContext
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
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
TYPE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ContextResource
-
-
Method Details
-
as
-
invalidate
- Overrides:
invalidate
in classResource
- Throws:
ResourceBusyException
-
prepare
public void prepare()- Specified by:
prepare
in interfaceIDependencyComponent
-