Class IbisApplicationContext

java.lang.Object
org.frankframework.lifecycle.IbisApplicationContext
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
IbisContext

public class IbisApplicationContext extends Object implements Closeable
Creates and maintains the (Spring) Application Context. If the context is loaded through a servlet it will register the servlet in the context. When the Application Context is created or destroyed it will also create/destroy the servlet. This ensures that the correct bus will be used in which CXF will register it's endpoints and dispatchers.



It is important that the Application Context is created before the servlet initializes. Otherwise the servlet will register under the wrong bus!



It is possible to retrieve the Application Context through the Spring WebApplicationContextUtils class

See Also:
  • WebApplicationContextUtils.getWebApplicationContext(javax.servlet.ServletContext)
  • Field Details

    • APP_CONSTANTS

      protected static final AppConstants APP_CONSTANTS
  • Constructor Details

    • IbisApplicationContext

      public IbisApplicationContext()
  • Method Details

    • setParentContext

      public void setParentContext(org.springframework.context.ApplicationContext parentContext)
    • createApplicationContext

      protected void createApplicationContext() throws org.springframework.beans.BeansException
      Create Spring Bean factory.

      Create the Spring Bean Factory using the default springContext, if not null.

      Throws:
      org.springframework.beans.BeansException - If the Factory can not be created.
    • getSpringConfigurationFiles

      protected String[] getSpringConfigurationFiles(ClassLoader classLoader)
      Loads springUnmanagedDeployment, SpringApplicationContext and files specified by the SPRING.CONFIG.LOCATIONS property in AppConstants.properties
      Parameters:
      classLoader - to use in order to find and validate the Spring Configuration files
      Returns:
      A String array containing all files to use.
    • close

      public void close()
      Destroys the Spring context
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getBean

      @Deprecated public <T> T getBean(String beanName, Class<T> beanClass)
      Deprecated.
    • createBeanAutowireByName

      @Deprecated public <T> T createBeanAutowireByName(Class<T> beanClass)
      Deprecated.
    • getApplicationContext

      protected org.springframework.context.support.AbstractApplicationContext getApplicationContext()
      Returns the Spring XML Bean Factory If non exists yet it will create one. If initializing the context fails, it will return null
      Returns:
      Spring XML Bean Factory or NULL
    • getBootState

      public IbisApplicationContext.BootState getBootState()