Package com.apress.prospring.ch13.jndi

Examples of com.apress.prospring.ch13.jndi.JndiTemplateMessageResolver


        writer.write(service.echo("Foo"));
    }

    private void doStatefulExample(ApplicationContext ctx, PrintWriter writer,
            HttpSession session) {
        CounterService service = (CounterService) session
                .getAttribute("counterService");

        if (service == null) {

            try {
                CounterServiceHome home = (CounterServiceHome) ctx
                        .getBean("counterServiceHome");

                service = (CounterService) home.create();

                session.setAttribute("counterService", service);
            } catch (CreateException ex) {
                ex.printStackTrace(writer);
                return;
            }
        }

        writer.write("Counter: " + service.increment());
    }
View Full Code Here


                .getAttribute("counterService");

        if (service == null) {

            try {
                CounterServiceHome home = (CounterServiceHome) ctx
                        .getBean("counterServiceHome");

                service = (CounterService) home.create();

                session.setAttribute("counterService", service);
            } catch (CreateException ex) {
                ex.printStackTrace(writer);
                return;
View Full Code Here

    }

    private void doStatelessExample(ApplicationContext ctx, PrintWriter writer) {
        // access the EJB proxy
        EchoService service = (EchoService) ctx.getBean("echoService");
        writer.write(service.echo("Foo"));
    }
View Full Code Here

TOP

Related Classes of com.apress.prospring.ch13.jndi.JndiTemplateMessageResolver

Copyright © 2018 www.massapicom. 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.