public class DefaultOsgiApplicationContextCreator extends java.lang.Object implements OsgiApplicationContextCreator
OsgiApplicationContextCreator implementation.
Creates an OsgiBundleXmlApplicationContext instance using the
default locations (Spring-Context manifest header or
META-INF/spring/*.xml) if available, null otherwise.
Additionally, this implementation allows custom locations to be
specified through ConfigurationScanner interface.ConfigurationScanner| Modifier and Type | Field and Description |
|---|---|
private ConfigurationScanner |
configurationScanner |
private static org.apache.commons.logging.Log |
log
logger
|
| Constructor and Description |
|---|
DefaultOsgiApplicationContextCreator() |
| Modifier and Type | Method and Description |
|---|---|
DelegatedExecutionOsgiBundleApplicationContext |
createApplicationContext(org.osgi.framework.BundleContext bundleContext)
Creates an application context for the given bundle context.
|
void |
setConfigurationScanner(ConfigurationScanner configurationScanner)
Sets the configurationScanner used by this creator.
|
private static final org.apache.commons.logging.Log log
private ConfigurationScanner configurationScanner
public DefaultOsgiApplicationContextCreator()
public DelegatedExecutionOsgiBundleApplicationContext createApplicationContext(org.osgi.framework.BundleContext bundleContext) throws java.lang.Exception
OsgiApplicationContextCreatornull should be
returned. Exceptions will be caught and logged but will not prevent the
creation of other application contexts.createApplicationContext in interface OsgiApplicationContextCreatorbundleContext - OSGi bundle context determining the context creationnull if no context should be created, non-
null otherwisejava.lang.Exception - if something goes wrongpublic void setConfigurationScanner(ConfigurationScanner configurationScanner)
configurationScanner - The configurationScanner to set.