Examples of EZBComponent


Examples of org.ow2.easybeans.component.api.EZBComponent

        if (resourceAdapterFinder != null) {
            return resourceAdapterFinder.getResourceAdapter(jndiName);
        }

        // try to see if JMS mini-resource adapter service was started.
        EZBComponent component = embedded.getComponent("org.ow2.easybeans.component.joram.JoramComponent");
        if (component != null) {
            // get ResourceAdapter from the service
            if (component instanceof JMSComponent) {
                return ((JMSComponent) component).getResourceAdapter();
            }
View Full Code Here

Examples of org.ow2.easybeans.component.api.EZBComponent

            }


            // Call init method if any on each component
            for (String componentName : this.componentNames) {
                EZBComponent component = this.componentRegistry.getComponent(componentName);
                component.init();
            }

        }
    }
View Full Code Here

Examples of org.ow2.easybeans.component.api.EZBComponent

        StringBuilder sb = new StringBuilder();
        sb.append("[ Component(s) started : ");

        // Call init method if any on each component
        for (String componentName : this.componentNames) {
            EZBComponent component = this.componentRegistry.getComponent(componentName);
            component.start();

            // append the component name
            String name = component.getClass().getSimpleName();
            // remove "Component" substring if any
            if (name.endsWith(COMPONENT_STR)) {
                name = name.substring(0, name.lastIndexOf(COMPONENT_STR));
            }
            sb.append(name);
View Full Code Here

Examples of org.ow2.easybeans.component.api.EZBComponent

        // Call stop method if any on each component in the reverse order of the start.
        int size = this.componentNames.size();
        for (int i = size - 1; i >= 0; i--) {
            String componentName = this.componentNames.get(i);
            EZBComponent component = this.componentRegistry.getComponent(componentName);
            try {
                component.stop();
            } catch (EZBComponentException e) {
                this.logger.error("Cannot stop component with name '" + componentName + "'.", e);
            }
        }
    }
View Full Code Here

Examples of org.ow2.easybeans.component.api.EZBComponent

        String name = null;

        // Find component
        Set<String> keys = this.components.keySet();
        for (String key : keys) {
            EZBComponent foundComponent = this.components.get(key);
            if (foundComponent.equals(component)) {
                // got it !
                name = key;
                break;
            }
        }
View Full Code Here

Examples of org.ow2.easybeans.component.api.EZBComponent

        // Iterates over the components to find the component's name
        String match = null;
        for (Iterator<String> i = this.components.keySet().iterator();
            i.hasNext() && (match == null);) {
            String key = i.next();
            EZBComponent candidate = this.components.get(key);
            if (component.equals(candidate)) {
                match = key;
                break;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.