Package org.jboss.test.web.interfaces

Examples of org.jboss.test.web.interfaces.StatelessSessionLocal


      {
         InitialContext ctx = new InitialContext();
         StatelessSessionLocalHome home = null;
         Context enc = (Context) ctx.lookup("java:comp/env");
         home = (StatelessSessionLocalHome) enc.lookup("ejb/local/SecuredEJB");
         StatelessSessionLocal bean = home.create();
         if( method.equals("echo") )
            bean.echo("UnsecureEJBServlet called SecuredEJB.echo");
         else if( method.equals("unchecked") )
            bean.unchecked();
         else if( method.equals("checkRunAs") )
            bean.checkRunAs();
         else
            throw new IllegalArgumentException("method must be one of: echo, unchecked, checkRunAs");
      }
      catch(Exception e)
      {
View Full Code Here


         bean = home.create();
         bean.noop(new ReferenceTest(), true);
         ReturnData data = bean.getData();

         StatelessSessionLocalHome localHome = (StatelessSessionLocalHome) enc.lookup("ejb/local/OptimizedEJB");
         StatelessSessionLocal localBean = localHome.create();
         localBean.noop(new ReferenceTest(), true);
      }
      catch (Exception e)
      {
         throw new ServletException("Failed to call OptimizedEJB through remote and local interfaces", e);
      }
View Full Code Here

TOP

Related Classes of org.jboss.test.web.interfaces.StatelessSessionLocal

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.