// Retrieve
String containerName = config.getInitParameter(CONTAINER_PROPERTY);
if (containerName == null) {
containerName = CONTAINER_DEFAULT;
}
JBIContainer container = (JBIContainer) applicationContext.getBean(containerName);
if (container == null) {
throw new IllegalStateException("Unable to find jbi container " + containerName);
}
String componentName = config.getInitParameter(COMPONENT_PROPERTY);
if (componentName == null) {
componentName = COMPONENT_DEFAULT;
}
ComponentMBeanImpl componentMBean = container.getComponent(componentName);
if (componentMBean == null) {
throw new IllegalStateException("Unable to find component " + componentName);
}
if (componentMBean.getComponent() instanceof HttpSpringComponent == false) {
throw new IllegalStateException("The component is not an instance of HttpSpringComponent");