Package org.apache.geronimo.xbeans.geronimo.naming

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType


    public String getAdminObjectLink() {
        return getMessageDestination().getAdminObjectLink();
    }

    public void setAdminObjectLink(String link) {
        GerMessageDestinationType ref = getMessageDestination();
        if(link != null && ref.isSetPattern()) {
            clearPatternFromChoice();
        }
        String old = getAdminObjectLink();
        ref.setAdminObjectLink(link);
        pcs.firePropertyChange("adminObjectLink", old, link);
    }
View Full Code Here


    public String getAdminObjectModule() {
        return getMessageDestination().getAdminObjectModule();
    }

    public void setAdminObjectModule(String module) {
        GerMessageDestinationType ref = getMessageDestination();
        if(module != null && ref.isSetPattern()) {
            clearPatternFromChoice();
        }
        String old = getAdminObjectModule();
        ref.setAdminObjectModule(module);
        pcs.firePropertyChange("adminObjectModule", old, module);
    }
View Full Code Here

        pcs.firePropertyChange("adminObjectModule", old, module);
    }


    protected void clearNonPatternFromChoice() {
        GerMessageDestinationType ref = getMessageDestination();
        if(ref.isSetAdminObjectLink()) {
            String temp = ref.getAdminObjectLink();
            ref.unsetAdminObjectLink();
            pcs.firePropertyChange("adminObjectLink", temp, null);
        }
        if(ref.isSetAdminObjectModule()) {
            String temp = ref.getAdminObjectModule();
            ref.unsetAdminObjectModule();
            pcs.firePropertyChange("adminObjectModule", temp, null);
        }
    }
View Full Code Here

            //}
        }
        // Handle removed or new messageDestinations
        for (Iterator it = before.iterator(); it.hasNext();) {
            MessageDestination adapter = (MessageDestination) it.next();
            GerMessageDestinationType all[] = getWebApp().getMessageDestinationArray();
            for (int i = 0; i < all.length; i++) {
                if(all[i] == adapter) {
                    getWebApp().removeMessageDestination(i);
                    break;
                }
View Full Code Here

    public void initContext(XmlObject specDD, XmlObject plan, Module module) throws DeploymentException {
        List<MessageDestinationType> specDestinations = convert(specDD.selectChildren(messageDestinationQNameSet), JEE_CONVERTER, MessageDestinationType.class, MessageDestinationType.type);
        XmlObject[] gerDestinations = plan.selectChildren(GER_MESSAGE_DESTINATION_QNAME_SET);
        Map<String, GerMessageDestinationType> nameMap = new HashMap<String, GerMessageDestinationType>();
        for (XmlObject gerDestination : gerDestinations) {
            GerMessageDestinationType destination = (GerMessageDestinationType) gerDestination.copy().changeType(GerMessageDestinationType.type);
            String name = destination.getMessageDestinationName().trim();
            nameMap.put(name, destination);
            boolean found = false;
            for (MessageDestinationType specDestination : specDestinations) {
                if (specDestination.getMessageDestinationName().getStringValue().trim().equals(name)) {
                    found = true;
View Full Code Here

                if (type == null) {
                    throw new DeploymentException("No type for message-destination-ref in injection target: " + targets[0]);
                }
            }

            GerMessageDestinationType destination = getMessageDestination(linkName, messageDestinations);
           
            Object value = null;
            if (destination == null) {
                String lookupName = getStringValue(messageDestinationRef.getLookupName());
                if (lookupName != null) {
View Full Code Here

        ResourceReferenceFactory<RuntimeException> ref = buildAdminObjectReference(module, containerId, iface);
        return ref;
    }
   
    public static GerMessageDestinationType getMessageDestination(String messageDestinationLink, Map<String, Map<String, GerMessageDestinationType>> messageDestinations) throws DeploymentException {
        GerMessageDestinationType destination = null;
        int pos = messageDestinationLink.indexOf('#');
        if (pos > -1) {
            String targetModule = messageDestinationLink.substring(0, pos);
            Map<String, GerMessageDestinationType> destinations = messageDestinations.get(targetModule);
            // Hmmm...if we don't find the module then something is wrong in the deployment.
            if (destinations == null) {
                StringBuffer sb = new StringBuffer();
                for (Object o : messageDestinations.keySet()) {
                    sb.append(o).append("\n");
                }
                throw new DeploymentException("Unknown module " + targetModule + " when processing message destination " + messageDestinationLink +
                        "\nKnown modules in deployable unit are:\n" + sb.toString());
            }
            messageDestinationLink = messageDestinationLink.substring(pos + 1);
            destination = destinations.get(messageDestinationLink);
        } else {
            for (Map<String, GerMessageDestinationType> destinations : messageDestinations.values()) {
                GerMessageDestinationType destinationTest = destinations.get(messageDestinationLink);
                if (destinationTest != null) {
                    if (destination != null) {
                        throw new DeploymentException("Duplicate message destination " + messageDestinationLink + " accessed from a message-destination-link without a module");
                    }
                    destination = destinationTest;
View Full Code Here

                    return true;
                }
            }

            //if it maps to a message-destination in the geronimo plan, it's a message-destination.
            GerMessageDestinationType gerMessageDestinationType = null;
            if (messageDestinations != null) {
                gerMessageDestinationType = getMessageDestination(resourceName, messageDestinations);
            }
            if (gerMessageDestinationType != null) {
                addMethodDestinationRef(annotatedApp, resourceName, resourceType, method, field, annotation);
View Full Code Here

    public void initContext(XmlObject specDD, XmlObject plan, Configuration localConfiguration, Configuration remoteConfiguration, Module module) throws DeploymentException {
        XmlObject[] specDestinations = convert(specDD.selectChildren(messageDestinationQNameSet), J2EE_CONVERTER, MessageDestinationType.type);
        XmlObject[] gerDestinations = plan.selectChildren(GER_MESSAGE_DESTINATION_QNAME_SET);
            Map nameMap = new HashMap();
            for (int i = 0; i < gerDestinations.length; i++) {
                GerMessageDestinationType destination = (GerMessageDestinationType) gerDestinations[i].copy().changeType(GerMessageDestinationType.type);
                String name = destination.getMessageDestinationName().trim();
                nameMap.put(name, destination);
                boolean found = false;
                for (int j = 0; j < specDestinations.length; j++) {
                    MessageDestinationType specDestination = (MessageDestinationType) specDestinations[j];
                    if (specDestination.getMessageDestinationName().getStringValue().trim().equals(name)) {
View Full Code Here

            } catch (ClassNotFoundException e) {
                throw new DeploymentException("could not load class " + type, e);
            }
            String moduleURI = null;
            Map messageDestinations = module.getRootEarContext().getMessageDestinations();
            GerMessageDestinationType destination = getMessageDestination(linkName, messageDestinations);
            if (destination != null) {
                if (destination.isSetAdminObjectLink()) {
                    if (destination.isSetAdminObjectModule()) {
                        moduleURI = destination.getAdminObjectModule().trim();
                    }
                    linkName = destination.getAdminObjectLink().trim();
                }
            } else {
                //well, we know for sure an admin object is not going to be defined in a modules that can have a message-destination
                int pos = linkName.indexOf('#');
                if (pos > -1) {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType

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.