Examples of StatefulCalcRemote


Examples of org.ow2.easybeans.mavenplugin.examples.calculator.StatefulCalcRemote

    public static void main(final String[] args) throws Exception {

        try {
            System.out.println("Testing unbound project with Maven EasyBeans Plugin...");
            Context initialContext = getInitialContext();
            StatefulCalcRemote calc = getCalcEJB(initialContext);
            HelloInterface hr = getHelloEJB(initialContext);

            System.out.println("Calling Calculator methods : x = " + INITIAL_CALC_VALUE + " + " + VALUE_TEST_ADD);
            calc.initial(INITIAL_CALC_VALUE);
            calc.add(VALUE_TEST_ADD);
            Integer x = calc.result();

            System.out.println("Calling HelloWorld method : sayHello(x)");
            String result = hr.sayHello(x.toString());

            System.out.println("Result : " + result);
View Full Code Here

Examples of org.ow2.easybeans.mavenplugin.examples.calculator.StatefulCalcRemote

     * Get the StatefulCalcRemote EJB interface.
     * @param context Initial Context
     * @return Interface of EJB
     */
    private static StatefulCalcRemote getCalcEJB(final Context context) {
        StatefulCalcRemote c = null;

        try {
            c = (StatefulCalcRemote) context.lookup(CALC_JNDI_NAME);
        } catch (NamingException ex) {
            Logger.getLogger(Client.class.getName()).log(Level.SEVERE, "Unable to found StatefulCalcRemote EJB.", ex);
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.