Package org.frankframework.lifecycle
Class IbisApplicationContext
java.lang.Object
org.frankframework.lifecycle.IbisApplicationContext
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
IbisContext
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(jakarta.servlet.ServletContext)
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Destroys the Spring contextprotected void
Create Spring Bean factory.<T> T
createBeanAutowireByName
(Class<T> beanClass) Deprecated.protected org.springframework.context.support.AbstractApplicationContext
Returns the Spring XML Bean Factory If non exists yet it will create one.<T> T
Deprecated.protected String[]
getSpringConfigurationFiles
(ClassLoader classLoader) Loads springUnmanagedDeployment, SpringApplicationContext and files specified by the SPRING.CONFIG.LOCATIONS property in AppConstants.propertiesvoid
setParentContext
(org.springframework.context.ApplicationContext parentContext)
-
Field Details
-
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.BeansExceptionCreate Spring Bean factory.Create the Spring Bean Factory using the default
springContext
, if notnull
.- Throws:
org.springframework.beans.BeansException
- If the Factory can not be created.
-
getSpringConfigurationFiles
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 interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getBean
Deprecated. -
createBeanAutowireByName
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
-