Package org.apache.geronimo.gbean

Examples of org.apache.geronimo.gbean.ReferenceCollectionListener


        verifyObjectName(myObjectName);

        this.server = server;
        this.application = application;
        this.deploymentDescriptor = deploymentDescriptor;
        ((ReferenceCollection) ejbs).addReferenceCollectionListener(new ReferenceCollectionListener() {

            public void memberAdded(ReferenceCollectionEvent event) {
                EjbDeployment ejb = (EjbDeployment) event.getMember();
                addEjb(ejb);
            }
View Full Code Here


    protected QNameSet planQNames = QNameSet.EMPTY;

    protected AbstractBuilderCollection(Collection<T> builders) {
        this.builders = builders == null ? Collections.<T>emptySet() : builders;
        if (builders instanceof ReferenceCollection) {
            ((ReferenceCollection) builders).addReferenceCollectionListener(new ReferenceCollectionListener() {

                public void memberAdded(ReferenceCollectionEvent event) {
                    addBuilder((T) event.getMember());
                }
View Full Code Here

            listenerCopy = new ArrayList(listeners);
        }

        // fire the member added event
        for (Iterator iterator = listenerCopy.iterator(); iterator.hasNext();) {
            ReferenceCollectionListener listener = (ReferenceCollectionListener) iterator.next();
            try {
                listener.memberAdded(new ReferenceCollectionEvent(name, proxy));
            } catch (Throwable t) {
                log.error("Listener threw exception", t);
            }
        }
    }
View Full Code Here

            listenerCopy = new ArrayList(listeners);
        }

        // fire the member removed event
        for (Iterator iterator = listenerCopy.iterator(); iterator.hasNext();) {
            ReferenceCollectionListener listener = (ReferenceCollectionListener) iterator.next();
            try {
                listener.memberRemoved(new ReferenceCollectionEvent(name, proxy));
            } catch (Throwable t) {
                log.error("Listener threw exception", t);
            }
        }
View Full Code Here

    private String defaultNamespace;

    public SwitchingModuleBuilder(Collection builders) {
        ReferenceCollection buildersCollection = (ReferenceCollection) builders;
        buildersCollection.addReferenceCollectionListener(new ReferenceCollectionListener() {
            public void memberAdded(ReferenceCollectionEvent event) {
                ModuleBuilder builder = (ModuleBuilder) event.getMember();
                String namespace = builder.getSchemaNamespace();
                namespaceToBuilderMap.put(namespace, builder);
            }
View Full Code Here

            }
        }

        //Add the hosts
        ReferenceCollection refs = (ReferenceCollection)hosts;
        refs.addReferenceCollectionListener(new ReferenceCollectionListener() {

            public void memberAdded(ReferenceCollectionEvent event) {
                Object o = event.getMember();
                ObjectRetriever objectRetriever = (ObjectRetriever) o;
                addHost(objectRetriever);
View Full Code Here

            listenerCopy = new ArrayList(listeners);
        }

        // fire the member added event
        for (Iterator iterator = listenerCopy.iterator(); iterator.hasNext();) {
            ReferenceCollectionListener listener = (ReferenceCollectionListener) iterator.next();
            try {
                listener.memberAdded(new ReferenceCollectionEvent(name, proxy));
            } catch (Throwable t) {
                log.error("Listener threw exception", t);
            }
        }
    }
View Full Code Here

            listenerCopy = new ArrayList(listeners);
        }

        // fire the member removed event
        for (Iterator iterator = listenerCopy.iterator(); iterator.hasNext();) {
            ReferenceCollectionListener listener = (ReferenceCollectionListener) iterator.next();
            try {
                listener.memberRemoved(new ReferenceCollectionEvent(name, proxy));
            } catch (Throwable t) {
                log.error("Listener threw exception", t);
            }
        }
View Full Code Here

    private String defaultNamespace;

    public SwitchingModuleBuilder(Collection builders) {
        this.builders = (ReferenceCollection) builders;
        this.builders.addReferenceCollectionListener(new ReferenceCollectionListener() {
            public void memberAdded(ReferenceCollectionEvent event) {
                ModuleBuilder builder = (ModuleBuilder) event.getMember();
                String namespace = builder.getSchemaNamespace();
                namespaceToBuilderMap.put(namespace, builder);
            }
View Full Code Here

        }
        if (!datas.isEmpty()) {
            throw new IllegalStateException("Cannot resolve ServerInstanceDatas: " + datas);
        }
        if (serverInstanceDatas instanceof ReferenceCollection) {
            ((ReferenceCollection) serverInstanceDatas).addReferenceCollectionListener(new ReferenceCollectionListener() {

                public void memberAdded(ReferenceCollectionEvent event) {
                    ServerInstanceData instance = (ServerInstanceData) event.getMember();
                    try {
                        addServerInstance(instance, artifactManager, writeableRepo, serverInfo, servers, live);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.gbean.ReferenceCollectionListener

Copyright © 2018 www.massapicom. 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.