Examples of GerMessageDestinationType


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

            //}
        }
        // 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

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

        if (annotatedWebAppDD instanceof WebApp) {
            WebApp webAppDD = (WebApp) annotatedWebAppDD;
            List<MessageDestination> messageDestinations = webAppDD.getMessageDestination();
            for (MessageDestination messageDestination: messageDestinations) {
                String messageDestinationName = messageDestination.getMessageDestinationName();
                GerMessageDestinationType gerMessageDestination = webApp.addNewMessageDestination();
                messageDestination.setMessageDestinationName(messageDestinationName);
                // messageDestination.setAdminObjectLink(messageDestinationName);
            }
        }
    }
View Full Code Here

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

    private static final String JAXR_CONNECTION_FACTORY_CLASS = "javax.xml.registry.ConnectionFactory";

    public static void registerMessageDestinations(RefContext refContext, String moduleName, MessageDestinationType[] specDestinations, GerMessageDestinationType[] destinations) throws DeploymentException {
        Map nameMap = new HashMap();
        for (int i = 0; i < destinations.length; i++) {
            GerMessageDestinationType destination = destinations[i];
            String name = destination.getMessageDestinationName().trim();
            nameMap.put(name, destination);
            boolean found = false;
            for (int j = 0; j < specDestinations.length; j++) {
                MessageDestinationType specDestination = specDestinations[j];
                if (specDestination.getMessageDestinationName().getStringValue().trim().equals(name)) {
View Full Code Here

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

                iface = cl.loadClass(type);
            } catch (ClassNotFoundException e) {
                throw new DeploymentException("could not load class " + type, e);
            }
            URI moduleURI = URI.create("");
            GerMessageDestinationType destination = (GerMessageDestinationType) refContext.getMessageDestination(linkName);
            if (destination != null) {
                if (destination.isSetAdminObjectLink()) {
                    if (destination.isSetAdminObjectModule()) {
                        String module = destination.getAdminObjectModule().trim();
                        try {
                            moduleURI = new URI(module);
                        } catch (URISyntaxException e) {
                            throw new DeploymentException("Could not construct module URI", e);
                        }
                    }
                    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

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

    public void initContext(XmlObject specDD, XmlObject plan, Configuration localConfiguration, Configuration remoteConfiguration, Module module) throws DeploymentException {
        List<MessageDestinationType> specDestinations = convert(specDD.selectChildren(messageDestinationQNameSet), J2EE_CONVERTER, MessageDestinationType.class, 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 (MessageDestinationType specDestination: specDestinations) {
                    if (specDestination.getMessageDestinationName().getStringValue().trim().equals(name)) {
                        found = true;
View Full Code Here

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

            } 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

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

        }

    }

    public static GerMessageDestinationType getMessageDestination(String messageDestinationLink, Map messageDestinations) throws DeploymentException {
        GerMessageDestinationType destination = null;
        int pos = messageDestinationLink.indexOf('#');
        if (pos > -1) {
            String targetModule = messageDestinationLink.substring(0, pos);
            Map destinations = (Map) 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 (Iterator mapIterator = messageDestinations.keySet().iterator(); mapIterator.hasNext();) {
                    sb.append(mapIterator.next()).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 = (GerMessageDestinationType) destinations.get(messageDestinationLink);
        } else {
            for (Iterator iterator = messageDestinations.values().iterator(); iterator.hasNext();) {
                Map destinations = (Map) iterator.next();
                GerMessageDestinationType destinationTest = (GerMessageDestinationType) 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

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

    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

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

                iface = cl.loadClass(type);
            } catch (ClassNotFoundException e) {
                throw new DeploymentException("could not load class " + type, e);
            }
            String moduleURI = null;
            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

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

        }

    }

    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
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.