Examples of ComponentManager


Examples of org.codehaus.plexus.component.manager.ComponentManager

        if ( component == null )
        {
            return;
        }

        ComponentManager componentManager = componentManagerManager.findComponentManagerByComponentInstance( component );

        if ( componentManager == null )
        {
            if ( parentContainer != null )
            {
                parentContainer.release( component );
            }
            else
            {
                getLogger().warn( "Component manager not found for returned component. Ignored. component=" + component );
            }
        }
        else
        {
            componentManager.release( component );

            if ( componentManager.getConnections() <= 0 )
            {
                componentManagerManager.unassociateComponentWithComponentManager( component );
            }
        }
    }
View Full Code Here

Examples of org.codehaus.plexus.component.manager.ComponentManager

        if ( component == null )
        {
            return;
        }

        ComponentManager componentManager = componentManagerManager.findComponentManagerByComponentInstance( component );

        componentManager.suspend( component );
    }
View Full Code Here

Examples of org.codehaus.plexus.component.manager.ComponentManager

        if ( component == null )
        {
            return;
        }

        ComponentManager componentManager = componentManagerManager.findComponentManagerByComponentInstance( component );

        componentManager.resume( component );
    }
View Full Code Here

Examples of org.enhydra.jawe.base.componentmanager.ComponentManager

            componentManager = (ComponentManager) cl.loadClass(cmClass).newInstance();
            componentManager.setPropertyMgr(propertyMgr);
            componentManager.init();
            loggingManager.info("JaWEManager -> Working with '" + cmClass + "' implementation of Component Manager");
        } catch (Throwable ex) {
            componentManager = new ComponentManager();
            componentManager.init();
            if (JaWE.getJaWEVersion() != JaWE.COMMUNITY_VERSION) {
                String msg = "JaWEManger -> Problems while instantiating Component Manager class '" + cmClass + "' - using default implementation!";
                loggingManager.error(msg, ex);
            } else {
View Full Code Here

Examples of org.ow2.easybeans.component.ComponentManager

        // Init components
        this.components = new Components();

        // Create component manager around components
        this.componentManager = new ComponentManager(this.components);

        this.j2eeManagedObjectId = J2EEManagedObjectNamingHelper.getJ2EEManagedObjectId(this);
    }
View Full Code Here

Examples of org.tubo.resource.component.ComponentManager

        //
        // get Manager identified by id
        Manager manager = getManager(id);
        //
        // define var
        ComponentManager componentManager;
        //
        // check instanceof
        if (manager instanceof ComponentManager) {
            //
            // cast manager to ComponentManager
View Full Code Here

Examples of org.tubo.resource.component.ComponentManager

        //
        // get component id (which this node reference)
        String componentId = componentRef.getRefId();
        //
        // get (via resource manager) the correct manager
        ComponentManager componentManager = resourceManager.getComponentManager(componentId);
        //
        // set flow node properties
        Properties flowNodeProps = componentRef.getProperties();
        Map itemProps = context.getItem().getProperties();
        itemProps.putAll(flowNodeProps);

        //
        // FIXME: ONLY TEST, FIX THAT!!!!!!!!!!!!!!!!!!
        //        we need exception management  :D
        Component component = null;
        String methodName = null;
        try {
//
            // get component (via manager)
            component = componentManager.getComponent();
            //
            // check event listen
            String action = context.getOriginEvent().getAction();
            if(componentRef.isListenEvent(action)) {
                //
                // get method to execute
                methodName = componentRef.getListenEventDef(action).getExecute();
                //
                // call method
                Method method = component.getClass().getMethod(methodName, new Class[] {FlowContext.class});
                method.invoke(component,new Object[] {context});
            } else {
                //
                // execute default method
                component.execute(context);
            }
        } catch (NoSuchMethodException e) {
            Object args[] = {
                    component.getClass().getName(),
                    methodName,
                    componentId
            };
            throw resourceManager.getExceptionManager().getException(1500,args,e);
        } catch (IllegalAccessException e) {
            Object args[] = {
                    component.getClass().getName(),
                    methodName,
                    componentId
            };
            throw resourceManager.getExceptionManager().getException(1501,args,e);
        } catch (IllegalArgumentException e) {
            Object args[] = {
                    component.getClass().getName(),
                    methodName,
                    componentId
            };
            throw resourceManager.getExceptionManager().getException(1502,args,e);
        } catch (InvocationTargetException e) {
            Object args[] = {
                    component.getClass().getName(),
                    methodName,
                    componentId
            };
            throw resourceManager.getExceptionManager().getException(1503,args,e);
        } finally {
            //
            // restore component
            if (component!=null)
                componentManager.restore(component);
            //
            // delete flow node properties
            for(Iterator it=flowNodeProps.keySet().iterator(); it.hasNext(); ) {
                String prop = (String)it.next();
                itemProps.remove(prop);
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.