Example usage for org.springframework.jca.context ResourceAdapterApplicationContext ResourceAdapterApplicationContext

List of usage examples for org.springframework.jca.context ResourceAdapterApplicationContext ResourceAdapterApplicationContext

Introduction

In this page you can find the example usage for org.springframework.jca.context ResourceAdapterApplicationContext ResourceAdapterApplicationContext.

Prototype

public ResourceAdapterApplicationContext(BootstrapContext bootstrapContext) 

Source Link

Document

Create a new ResourceAdapterApplicationContext for the given BootstrapContext.

Usage

From source file:org.springframework.jca.context.SpringContextResourceAdapter.java

/**
 * Build a Spring ApplicationContext for the given JCA BootstrapContext.
 * <p>The default implementation builds a {@link ResourceAdapterApplicationContext}
 * and delegates to {@link #loadBeanDefinitions} for actually parsing the
 * specified configuration files./*from  w w  w  .j a va2 s  .c om*/
 * @param bootstrapContext this ResourceAdapter's BootstrapContext
 * @return the Spring ApplicationContext instance
 */
protected ConfigurableApplicationContext createApplicationContext(BootstrapContext bootstrapContext) {
    ResourceAdapterApplicationContext applicationContext = new ResourceAdapterApplicationContext(
            bootstrapContext);

    // Set ResourceAdapter's ClassLoader as bean class loader.
    applicationContext.setClassLoader(getClass().getClassLoader());

    // Extract individual config locations.
    String[] configLocations = StringUtils.tokenizeToStringArray(getContextConfigLocation(),
            CONFIG_LOCATION_DELIMITERS);

    loadBeanDefinitions(applicationContext, configLocations);
    applicationContext.refresh();

    return applicationContext;
}