Examples of AppOne


Examples of org.jboss.as.quickstarts.ejb.multi.server.app.AppOne

        try {
            final InitialContext iCtx = getContext();

            write(response, "<h2>Invoke AppOne on different server</h2>");
            try {
                AppOne proxy = (AppOne) lookup(response, iCtx,
                    "ejb:jboss-ejb-multi-server-app-one/ejb//AppOneBean!org.jboss.as.quickstarts.ejb.multi.server.app.AppOne");
                if (proxy != null) {
                    write(response, "Invocation #1 return node.name => " + proxy.getJBossNodeName() + "<br/>");
                    // second invocation shows whether the same or a different node is reached
                    write(response, "Invocation #2 return node.name => " + proxy.getJBossNodeName() + "<br/>");
                } else {
                    fail = true;
                }
            } catch (Exception n) {
                LOGGER.log(Level.SEVERE, "Failed to invoke AppOne", n);
                write(response, "Failed to invoke AppOne<br/>");
                write(response, n.getMessage());
                fail = true;
            }
            write(response, "<h2>Invoke AppTwo on different server</h2>");
            try {
                AppTwo proxy = (AppTwo) lookup(response, iCtx,
                    "ejb:jboss-ejb-multi-server-app-two/ejb//AppTwoBean!org.jboss.as.quickstarts.ejb.multi.server.app.AppTwo");
                if (proxy != null) {
                    write(response, "Invocation #1 return node.name => " + proxy.getJBossNodeName() + "<br/>");
                    // second invocation shows whether the same or a different node is reached
                    write(response, "Invocation #2 return node.name => " + proxy.getJBossNodeName() + "<br/>");
                } else {
                    fail = true;
                }
            } catch (Exception n) {
                LOGGER.log(Level.SEVERE, "Failed to invoke AppTwo", n);
View Full Code Here

Examples of org.jboss.as.quickstarts.ejb.multi.server.app.AppOne

        try {
            final InitialContext iCtx = getContext();

            write(response, "<h2>Invoke AppOne on different server</h2>");
            try {
                AppOne proxy = (AppOne) lookup(response, iCtx,
                    "ejb:jboss-ejb-multi-server-app-one/ejb//AppOneBean!org.jboss.as.quickstarts.ejb.multi.server.app.AppOne");
                if (proxy != null) {
                    write(response, "Invocation #1 return node.name => " + proxy.getJBossNodeName() + "<br/>");
                    // second invocation shows whether the same or a different node is reached
                    write(response, "Invocation #2 return node.name => " + proxy.getJBossNodeName() + "<br/>");
                } else {
                    fail = true;
                }
            } catch (Exception n) {
                LOGGER.log(Level.SEVERE, "Failed to invoke AppOne", n);
                write(response, "Failed to invoke AppOne<br/>");
                write(response, n.getMessage());
                fail = true;
            }
            write(response, "<h2>Invoke AppTwo on different server</h2>");
            try {
                AppTwo proxy = (AppTwo) lookup(response, iCtx,
                    "ejb:jboss-ejb-multi-server-app-two/ejb//AppTwoBean!org.jboss.as.quickstarts.ejb.multi.server.app.AppTwo");
                if (proxy != null) {
                    write(response, "Invocation #1 return node.name => " + proxy.getJBossNodeName() + "<br/>");
                    // second invocation shows whether the same or a different node is reached
                    write(response, "Invocation #2 return node.name => " + proxy.getJBossNodeName() + "<br/>");
                } else {
                    fail = true;
                }
            } catch (Exception n) {
                LOGGER.log(Level.SEVERE, "Failed to invoke AppTwo", n);
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.