Package org.jboss.as.demos.ejb3.archive

Examples of org.jboss.as.demos.ejb3.archive.EchoService.echo()


        InitialContext ctx = new InitialContext();
        String name = "java:global/ejb3-example/SimpleStatefulSessionBean!" + SimpleStatefulSessionLocal.class.getName();
        SimpleStatefulSessionLocal bean = (SimpleStatefulSessionLocal) ctx.lookup(name);
        bean.setState("via another view");
        EchoService view = bean.getEchoService();
        return view.echo("echo service");
    }
}
View Full Code Here


    public String call() throws Exception {
        InitialContext ctx = new InitialContext();
        String name = "java:global/ejb3-example/SimpleStatefulSessionBean!" + SimpleStatefulSessionLocal.class.getName();
        SimpleStatefulSessionLocal bean = (SimpleStatefulSessionLocal) ctx.lookup(name);
        bean.setState("42");
        return bean.echo("the answer");
    }
}
View Full Code Here

            utils.deploy();

            MBeanServerConnection mbeanServer = utils.getConnection();

            SimpleStatelessSessionLocal bean = createProxy(mbeanServer, "java:global/ejb3-example/SimpleStatelessSessionBean!" + SimpleStatelessSessionLocal.class.getName(), SimpleStatelessSessionLocal.class);
            String msg = bean.echo("Hello world");
            System.out.println(msg);

            exec(mbeanServer, ExerciseStateful.class);

            String singletonBeanJndiName = "java:global/ejb3-example/SimpleSingletonBean!" + SimpleSingletonLocal.class.getName();
View Full Code Here

            utils.deploy();

            MBeanServerConnection mbeanServer = utils.getConnection();

            SimpleStatelessSessionLocal bean = createProxy(mbeanServer, "java:global/ejb3-example/SimpleStatelessSessionBean!" + SimpleStatelessSessionLocal.class.getName(), SimpleStatelessSessionLocal.class);
            String msg = bean.echo("Hello world");
            System.out.println(msg);

            final String result = (String)mbeanServer.invoke(new ObjectName("jboss:name=ejb3-test,type=service"), "callAsync", new Object[] {"java:global/ejb3-example/AsyncBean!" + AsyncLocal.class.getName(), "Hello World"}, new String[] {String.class.getName(), String.class.getName()});
            System.out.println(result);
View Full Code Here

            utils.deploy();

            MBeanServerConnection mbeanServer = utils.getConnection();

            SimpleStatelessSessionLocal bean = createProxy(mbeanServer, "java:global/ejb3-example/SimpleStatelessSessionBean!" + SimpleStatelessSessionLocal.class.getName(), SimpleStatelessSessionLocal.class);
            String msg = bean.echo("Hello world");
            System.out.println(msg);

            final String result = (String)mbeanServer.invoke(new ObjectName("jboss:name=ejb3-test,type=service"), "callAsync", new Object[] {"java:global/ejb3-example/AsyncBean!" + AsyncLocal.class.getName(), "Hello World"}, new String[] {String.class.getName(), String.class.getName()});
            System.out.println(result);
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.