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

        d1.addNewMessageDestinationName().setStringValue(name);
        return d1;
    }

    private GerMessageDestinationType makeGerMD(String name, String link) {
        GerMessageDestinationType d1 = GerMessageDestinationType.Factory.newInstance();
        d1.setMessageDestinationName(name);
        d1.setAdminObjectLink(link);
        return d1;
    }
View Full Code Here

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

        d1.setAdminObjectLink(link);
        return d1;
    }

    private GerMessageDestinationType makeGerMD(String name, String module, String link) {
        GerMessageDestinationType d1 = makeGerMD(name, link);
        d1.setAdminObjectModule(module);
        return d1;
    }
View Full Code Here

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

        d1.addNewMessageDestinationName().setStringValue(name);
        return d1;
    }

    private GerMessageDestinationType makeGerMD(String name, String link) {
        GerMessageDestinationType d1 = GerMessageDestinationType.Factory.newInstance();
        d1.setMessageDestinationName(name);
        d1.setAdminObjectLink(link);
        return d1;
    }
View Full Code Here

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

        d1.setAdminObjectLink(link);
        return d1;
    }

    private GerMessageDestinationType makeGerMD(String name, String module, String link) {
        GerMessageDestinationType d1 = makeGerMD(name, link);
        d1.setAdminObjectModule(module);
        return d1;
    }
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);
            }
            String moduleURI = null;
            GerMessageDestinationType destination = (GerMessageDestinationType) refContext.getMessageDestination(linkName);
            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 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.