The class listens to bundle events and manages the creation and destruction of application contexts for bundles that have one or both of:
The extender also discovers any Spring namespace/schema handlers in resolved bundles and makes them available through a dedicated OSGi service.
The extender behaviour can be customized by attaching fragments to the extender bundle. On startup, the extender will look for META-INF/spring/*.xml
files and merge them into an application context. From the resulting context, the context will look for beans with predefined names to determine its configuration. The current version recognises the following bean names:
Bean Name | Bean Type | Description |
---|---|---|
taskExecutor | org.springframework.core.task.TaskExecutor | Task executor used for creating the discovered application contexts. |
shutdownTaskExecutor | org.springframework.core.task.TaskExecutor | Task executor used for shutting down various application contexts. |
extenderProperties | java.util.Properties | Various properties for configuring the extender behaviour (see below) |
extenderProperties
recognises the following properties:
Name | Type | Description |
---|---|---|
shutdown.wait.time | Number | The amount of time the extender will wait for each application context to shutdown gracefully. Expressed in milliseconds. |
process.annotations | Boolean | Whether or not, the extender will process SpringOSGi annotations. |
Note: The extender configuration context is created during the bundle activation (a synchronous OSGi lifecycle callback) and should contain only simple bean definitions that will not delay context initialisation.
@author Bill Gallagher @author Andy Piper @author Hal Hildebrand @author Adrian Colyer @author Costin LeauThis listener should be registered after {@link org.springframework.web.util.Log4jConfigListener}in web.xml
, if the latter is used.
As of Spring 3.1, {@code ContextLoaderListener} supports injecting the root webapplication context via the {@link #ContextLoaderListener(WebApplicationContext)}constructor, allowing for programmatic configuration in Servlet 3.0+ environments. See {@link org.springframework.web.WebApplicationInitializer} for usage examples. @author Juergen Hoeller @author Chris Beams @since 17.02.2003 @see org.springframework.web.WebApplicationInitializer @see org.springframework.web.util.Log4jConfigListener
|
|
|
|