Examples of MyStatefulRemoteBusiness


Examples of org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteBusiness

      Object bean = RemoteAccessTestCase.getContext().lookup(JNDI_NAME_SFSB_REMOTE);
      assertTrue("Bean must be assignable to " + MyStatefulRemoteBusiness.class.getSimpleName() + " but was instead "
            + bean.getClass(), bean instanceof MyStatefulRemoteBusiness);

      // Invoke and Test Result
      MyStatefulRemoteBusiness sfsb = ((MyStatefulRemoteBusiness) bean);
      int result = sfsb.getNextCounter();
      assertEquals(result, 0);
      result = sfsb.getNextCounter();
      assertEquals(result, 1);
   }
View Full Code Here

Examples of org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteBusiness

      Assert.assertNotNull("Remote jndi name " + remoteJNDIName + " lookup returned null", remote);
      Assert.assertTrue("Remote jndi name lookup at " + remoteJNDIName + " returned unexpected object " + remote,
            remote instanceof MyStatefulRemoteBusiness);

      MyStatefulRemoteBusiness remoteBean = (MyStatefulRemoteBusiness) remote;

      int countFromRemoteBean = remoteBean.getNextCounter();
      Assert.assertEquals("Unexpected count value: " + countFromRemoteBean + " from remote stateful bean",
            countFromRemoteBean, 0);

   }
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.