Examples of UnresolvedReferenceException


Examples of org.apache.geronimo.common.UnresolvedReferenceException

    //ResourceReferenceBuilder implementation
    public Reference createResourceRef(AbstractNameQuery containerId, Class iface, Configuration configuration) throws DeploymentException {
        try {
            configuration.findGBean(containerId);
        } catch (GBeanNotFoundException e) {
            throw new UnresolvedReferenceException("Resource", false, containerId.toString(), configuration.getId().toString());
        }
        return new ResourceReference(configuration.getId(), containerId, iface);
    }
View Full Code Here

Examples of org.apache.geronimo.common.UnresolvedReferenceException

                    AbstractNameQuery containerId = getResourceContainerId(name, j2eeType, null, gerResourceRef);

                    try {
                        localConfiguration.findGBean(containerId);
                    } catch (GBeanNotFoundException e) {
                        throw new UnresolvedReferenceException("Resource", false, containerId.toString(), localConfiguration.getId().toString());
                    }

                    Reference ref = new ResourceReference(localConfiguration.getId(), containerId, iface);
                    getJndiContextMap(componentContext).put(ENV + name, ref);
                } catch (UnresolvedReferenceException e) {
View Full Code Here

Examples of org.apache.geronimo.common.UnresolvedReferenceException

    private GBeanData locateGBeanInKernel(String name, String type, J2eeContext j2eeContext, String queryType) throws UnresolvedReferenceException {
        ObjectName query;
        try {
            query = NameFactory.getComponentRestrictedQueryName(null, null, name, type, j2eeContext);
        } catch (MalformedObjectNameException e1) {
            throw (UnresolvedReferenceException) new UnresolvedReferenceException("Could not construct " + queryType + " object name query", false, null).initCause(e1);
        }
        return locateUniqueGBeanData(query, queryType);
    }
View Full Code Here

Examples of org.apache.geronimo.common.UnresolvedReferenceException


    private ObjectName locateUniqueNameInKernel(ObjectName query, String type) throws UnresolvedReferenceException {
        Set names = kernel.listGBeans(query);
        if (names.size() != 1) {
            throw new UnresolvedReferenceException(type, names.size() > 1, query.getCanonicalName());
        }
        return (ObjectName) names.iterator().next();
    }
View Full Code Here

Examples of org.apache.geronimo.common.UnresolvedReferenceException

        } catch (GBeanNotFoundException e) {
        }
        try {
            return kernel.getGBeanData(name);
        } catch (GBeanNotFoundException e) {
            throw new UnresolvedReferenceException("GBean name: " + name + " not found in DeploymentContext: " + context.getConfigID() + " or in kernel", false, null);
        }
    }
View Full Code Here

Examples of org.apache.geronimo.common.UnresolvedReferenceException

            moduleName = "*";
        }
        try {
            query = NameFactory.getComponentNameQuery(null, null, null, moduleType, moduleName, name, type, j2eeContext);
        } catch (MalformedObjectNameException e1) {
            throw (UnresolvedReferenceException) new UnresolvedReferenceException("Could not construct " + queryType + " object name query", false, null).initCause(e1);
        }
        ObjectName match = locateUniqueNameInContext(context, query);
        if (match == null) {
            if (!requireMatch) {
                return null;
            } else {
                throw new UnresolvedReferenceException("Could not resolve reference: module: " + moduleName + ", component name: " + name, false, query.toString());
            }
        }
        try {
            GBeanData data = context.getGBeanInstance(match);
            return data;
View Full Code Here

Examples of org.apache.geronimo.common.UnresolvedReferenceException

    private ObjectName locateUniqueNameInContext(NamingContext context, ObjectName query) throws UnresolvedReferenceException {
        ObjectName match = null;
        Set matches = context.listGBeans(query);
        if (matches.size() > 1) {
            throw new UnresolvedReferenceException("More than one match for query " + matches, true, query.getCanonicalName());
        }
        if (matches.size() == 1) {
            match = (ObjectName) matches.iterator().next();
        }
        return match;
View Full Code Here

Examples of org.apache.geronimo.common.UnresolvedReferenceException

                    AbstractNameQuery containerId = getResourceContainerId(name, j2eeType, null, gerResourceRef);

                    try {
                        localConfiguration.findGBean(containerId);
                    } catch (GBeanNotFoundException e) {
                        throw new UnresolvedReferenceException("Resource", false, containerId.toString(), localConfiguration.getId().toString());
                    }

                    Reference ref = new ResourceReference(localConfiguration.getId(), containerId, iface);
                    getJndiContextMap(componentContext).put(ENV + name, ref);
                } catch (UnresolvedReferenceException e) {
View Full Code Here

Examples of org.apache.geronimo.common.UnresolvedReferenceException

    //ResourceReferenceBuilder implementation
    public Reference createResourceRef(AbstractNameQuery containerId, Class iface, Configuration configuration) throws DeploymentException {
        try {
            configuration.findGBean(containerId);
        } catch (GBeanNotFoundException e) {
            throw new UnresolvedReferenceException("Resource", false, containerId.toString(), configuration.getId().toString());
        }
        return new ResourceReference(configuration.getId(), containerId, iface);
    }
View Full Code Here

Examples of org.apache.geronimo.common.UnresolvedReferenceException

    //ResourceRefBuilder implementation
    public Reference createResourceRef(AbstractNameQuery containerId, Class iface, Configuration configuration) throws DeploymentException {
        try {
            configuration.findGBean(containerId);
        } catch (GBeanNotFoundException e) {
            throw new UnresolvedReferenceException("Resource", false, containerId.toString(), configuration.getId().toString());
        }
        return new ResourceReference(configuration.getId(), containerId, iface);
    }
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.