Examples of JndiReference


Examples of org.apache.geronimo.naming.reference.JndiReference

                String lookupName = getStringValue(resourceRef.getLookupName());
                if (lookupName != null) {
                    if (lookupName.equals(getJndiName(name))) {
                        throw new DeploymentException("resource-ref lookup name refers to itself");
                    }
                    value = new JndiReference(lookupName);
                }
            }

            if (value == null) {
                value = buildReference(module, name, type, gerResourceRef);
View Full Code Here

Examples of org.apache.geronimo.naming.reference.JndiReference

            ManagedBean managed = iface.getAnnotation(ManagedBean.class);
            String beanName = managed.value().length() == 0 ? iface.getSimpleName() : managed.value();
            if (iface != null) {
                beanName = beanName + "!" + iface.getName();
            }
            return new JndiReference("java:module/" + beanName);
        } else {
            //determine jsr-77 type from interface
            String j2eeType;

            if (JAVAX_MAIL_SESSION_CLASS.equals(type)) {
View Full Code Here

Examples of org.apache.geronimo.naming.reference.JndiReference

                String lookupName = getStringValue(resourceEnvRef.getLookupName());
                if (lookupName != null) {
                    if (lookupName.equals(getJndiName(name))) {
                        throw new DeploymentException("resource-env-ref lookup name refers to itself");
                    }
                    value = new JndiReference(lookupName);
                }
            }

            if (value == null) {
                value = buildResourceReference(module, name, type, gerResourceEnvRef);
            }

            if (value == null) {
                unresolvedRefs.add(name);
            } else {
                put(name, value, ReferenceType.RESOURCE_ENV, module.getJndiContext(), resourceEnvRef.getInjectionTarget(), sharedContext);
            }
        }

        if (unresolvedRefs.size() > 0) {
            log.warn("Failed to build reference to resource env reference " + unresolvedRefs + " defined in plan file. The corresponding entry in Geronimo deployment descriptor is missing.");
        }

        //message-destination-refs

        for (Map.Entry<String, MessageDestinationRef> entry : specDD.getMessageDestinationRefMap().entrySet()) {
            String name = entry.getKey();
            if (lookupJndiContextMap(module, name) != null) {
                // some other builder handled this entry already
                continue;
            }
            MessageDestinationRef messageDestinationRef = entry.getValue();
            String linkName = getStringValue(messageDestinationRef.getMessageDestinationLink());
            //TODO figure out something better to do here!
            if (linkName == null) {
                linkName = name;
            }
            String type = getStringValue(messageDestinationRef.getMessageDestinationType());
            type = inferAndCheckType(module, bundle, messageDestinationRef.getInjectionTarget(), name, type);

            GerMessageDestinationType destination = getMessageDestination(linkName, messageDestinations);

            Object value = null;
            if (destination == null) {
                String lookupName = getStringValue(messageDestinationRef.getLookupName());
                if (lookupName != null) {
                    if (lookupName.equals(getJndiName(name))) {
                        throw new DeploymentException("message-destination-ref lookup name refers to itself");
                    }
                    value = new JndiReference(lookupName);
                }
            }

            if (value == null) {
                value = buildMessageReference(module, linkName, type, destination);
View Full Code Here

Examples of org.apache.geronimo.naming.reference.JndiReference

        if ("javax.ejb.EJBContext".equals(type) ||
                "javax.ejb.EntityContext".equals(type) ||
                "javax.ejb.MessageDrivenContext".equals(type) ||
                "javax.ejb.SessionContext".equals(type)) {
            return new JndiReference("java:comp/EJBContext");
        }
        if ("javax.xml.ws.WebServiceContext".equals(type)) {
            return new JndiReference("java:comp/WebServiceContext");
        }
        if ("javax.ejb.TimerService".equals(type)) {
            return new JndiReference("java:comp/TimerService");
        }
        if ("javax.validation.Validator".equals(type)) {
            return new JndiReference("java:comp/Validator");
        }
        if ("javax.validation.ValidatorFactory".equals(type)) {
            return new JndiReference("java:comp/ValidatorFactory");
        }
        if ("javax.enterprise.inject.spi.BeanManager".equals(type)) {
            return new JndiReference("java:comp/BeanManager");
        }
        if ("javax.transaction.TransactionSynchronizationRegistry".equals(type)) {
            return new JndiReference("java:comp/TransactionSynchronizationRegistry");
        }
        if ("javax.transaction.TransactionManager".equals(type)) {
            return new JndiReference("java:comp/TransactionManager");
        }
        if ("org.osgi.framework.Bundle".equals(type)) {
            return new JndiReference("java:comp/Bundle");
        }
        if ("org.osgi.framework.BundleContext".equals(type)) {
            return new JndiReference("java:comp/BundleContext");
        }
        try {
            AbstractNameQuery containerId = getAdminObjectContainerId(name, gerResourceEnvRef);
            Reference ref = buildAdminObjectReference(module, containerId);
            return ref;
View Full Code Here

Examples of org.apache.geronimo.naming.reference.JndiReference

    private Reference buildAdminObjectReference(Module module, AbstractNameQuery containerId) throws DeploymentException {
        Configuration localConfiguration = module.getEarContext().getConfiguration();
        try {
            AbstractName abstractName = localConfiguration.findGBean(containerId);
            //String osgiJndiName = "aries:services/" + module.getEarContext().getNaming().toOsgiJndiName(abstractName);
            return new JndiReference("aries:services/", abstractName);
        } catch (GBeanNotFoundException e) {
            throw new DeploymentException("Can not resolve admin object ref " + containerId + " in configuration " + localConfiguration.getId(), e);
        }
    }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.JndiReference

    protected Object createService(ServiceRef serviceRef, GerServiceRefType gerServiceRef, Module module, Bundle bundle, Class serviceInterfaceClass, QName serviceQName, URI wsdlURI,
            Class serviceReferenceType, Map<Class<?>, PortComponentRef> portComponentRefMap) throws DeploymentException {
        registerConfigGBean(module);

        if(serviceRef.getLookupName() != null && !serviceRef.getLookupName().isEmpty()) {
            return new JndiReference(serviceRef.getLookupName());
        }

        EndpointInfoBuilder builder = new EndpointInfoBuilder(serviceInterfaceClass, gerServiceRef, portComponentRefMap, module, bundle, wsdlURI, serviceQName);
        builder.build();
View Full Code Here

Examples of org.apache.geronimo.naming.reference.JndiReference

                                Module module, Bundle bundle, Class serviceInterface,
                                QName serviceQName, URI wsdlURI, Class serviceReference,
                                Map<Class<?>, PortComponentRef> portComponentRefMap) throws DeploymentException {

        if(serviceRef.getLookupName() != null && !serviceRef.getLookupName().isEmpty()) {
            return new JndiReference(serviceRef.getLookupName());
        }

        EndpointInfoBuilder builder = new EndpointInfoBuilder(serviceInterface,
                gerServiceRef, portComponentRefMap, module, bundle,
                wsdlURI, serviceQName);
View Full Code Here

Examples of org.apache.geronimo.naming.reference.JndiReference

                if (lookupName != null) {
                    //TODO better circular reference checking
                    if (lookupName.equals(getJndiName(name))) {
                        throw new DeploymentException("env-entry lookup name refers to itself");
                    }
                    value = new JndiReference(lookupName);
                }
            } else {
                strValue = strValueOverride;
            }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.JndiReference

                    String lookupName = getStringValue(envEntry.getLookupName());
                    if (lookupName != null) {
                        if (lookupName.equals(getJndiName(name))) {
                            throw new DeploymentException("env-entry lookup name refers to itself");
                        }
                        value = new JndiReference(lookupName);
                    }
                }
            }
           
            if (value == null) {
View Full Code Here

Examples of org.apache.geronimo.naming.reference.JndiReference

                String lookupName = getStringValue(resourceRef.getLookupName());
                if (lookupName != null) {
                    if (lookupName.equals(getJndiName(name))) {
                        throw new DeploymentException("resource-ref lookup name refers to itself");
                    }
                    value = new JndiReference(lookupName);
                }
            }
           
            if (value == null) {
                value = buildReference(module, name, type, gerResourceRef);
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.