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:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Destroys the Spring contextprotected void
Create Spring Bean factory.org.springframework.context.support.AbstractApplicationContext
Returns the Spring XML Bean Factory If non exists yet it will create one.protected final <T> T
Create bean without passing the bean-class.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
Create bean without passing the bean-class. Can be used when the compiler can statically determine the class from the variable to which the bean is assigned. Do not pass actual argument to reified, Java will auto-detect the class of the bean type. -
getApplicationContext
public 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. Ideally this method should not be exposed....- Returns:
- Spring XML Bean Factory or NULL
-
getBootState
-