Package org.jboss.test.web.interfaces

Examples of org.jboss.test.web.interfaces.StatelessSession.echo()


        {
            lc = doLogin("jduke", "theduke");
            InitialContext ctx = new InitialContext();
            StatelessSessionHome home = (StatelessSessionHome) ctx.lookup("java:comp/env/ejb/SecuredEJB");
            StatelessSession bean = home.create();
            echoMsg = bean.echo("ClientLoginServlet called SecuredEJB.echo");
        }
        catch(LoginException e)
        {
            throw new ServletException("Failed to login to client-login domain as jduke", e);
        }
View Full Code Here


            }
            else
            {
                home = (StatelessSessionHome) ctx.lookup("java:comp/env/ejb/SecuredEJB");
                StatelessSession bean = home.create();
                echoMsg = bean.echo("SecureEJBServlet called SecuredEJB.echo");
            }
        }
        catch(Exception e)
        {
            throw new ServletException("Failed to call SecuredEJB.echo", e);
View Full Code Here

                log.debug("Worker, start: "+System.currentTimeMillis());
                Thread.currentThread().sleep(2500);
                InitialContext ctx = new InitialContext();
                StatelessSessionHome home = home = (StatelessSessionHome) ctx.lookup("java:comp/env/ejb/SecuredEJB");
                StatelessSession bean = home.create();
                String echoMsg = bean.echo("SecureEJBServlet called SecuredEJB.echo");
                session.setAttribute("request.result", echoMsg);
            }
            catch(Exception e)
            {
                session.setAttribute("request.result", e);
View Full Code Here

      try
      {
         InitialContext ctx = new InitialContext();
         StatelessSessionHome home = (StatelessSessionHome) ctx.lookup("java:comp/env/ejb/Session");
         StatelessSession bean = home.create();
         echo = bean.echo(echoArg);
      }
      catch (Exception e)
      {
         log.debug("failed", e);
         e.fillInStackTrace();
View Full Code Here

         {
            log.info("Getting existing stateful session");
            SessionHandle wrapper = (SessionHandle) session.getAttribute("StatefulEJB");
            localBean = (StatelessSession) wrapper.h.getEJBObject();
         }
         localBean.echo("Hello");
      }
      catch (Exception e)
      {
         throw new ServletException("Failed to call StatefulEJB", e);
      }
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.