public void afterPropertiesSet()

in core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/SpringJBIContainer.java [67:118]


    public void afterPropertiesSet() throws Exception {
        init();

        // lets iterate through all the component names and register them
        if (componentNames != null) {
            for (int i = 0; i < componentNames.length; i++) {
                String componentName = componentNames[i];
                activateComponent(new ActivationSpec(componentName, lookupBean(componentName)));
            }
        }

        if (activationSpecs != null) {
            for (int i = 0; i < activationSpecs.length; i++) {
                ActivationSpec activationSpec = activationSpecs[i];
                activateComponent(activationSpec);
            }
        }

        if (deployArchives != null) {
            for (int i = 0; i < deployArchives.length; i++) {
                String archive = deployArchives[i];
                installArchive(archive);
            }
        }

        if (components != null) {
            for (Iterator it = components.entrySet().iterator(); it.hasNext();) {
                Map.Entry e = (Map.Entry) it.next();
                if (!(e.getKey() instanceof String)) {
                    throw new JBIException("Component must have a non null string name");
                }
                if (!(e.getValue() instanceof Component)) {
                    throw new JBIException("Component is not a known component");
                }
                String name = (String) e.getKey();
                activateComponent((Component) e.getValue(), name);
                getComponent(name).init();
            }
        }

        if (endpoints != null) {
            initEndpoints();
        }

        if (deployments != null) {
            for (DeploySupport deployment : deployments) {
                deployment.deploy(this);
            }
        }

        start();
    }