Package org.jboss.resteasy.cdi.ejb

Examples of org.jboss.resteasy.cdi.ejb.EJBRemoteResource


   public void testVerifyScopesRemoteEJB() throws Exception
   {
      log.info("starting testVerifyScopesRemoteEJB()");
     
      // Get proxy to JAX-RS resource as EJB.
      EJBRemoteResource remoteResource = getRemoteResource();
      log.info("remote: " + remoteResource);
      int result = remoteResource.verifyScopes();
      log.info("result: " + result);
      assertEquals(200, result);
   }
View Full Code Here


   public void testVerifyInjectionRemoteEJB() throws Exception
   {
      log.info("starting testVerifyInjectionRemoteEJB()");
     
      // Get proxy to JAX-RS resource as EJB.
      EJBRemoteResource remoteResource = getRemoteResource();
      log.info("remote: " + remoteResource);
      int result = remoteResource.verifyInjection();
      log.info("result: " + result);
      assertEquals(200, result);
   }
View Full Code Here

   public void testAsRemoteEJB() throws Exception
   {
      log.info("entering testAsRemoteEJB()");

      // Get proxy to JAX-RS resource as EJB.
      EJBRemoteResource remoteResource = getRemoteResource();
      log.info("remote: " + remoteResource);

      // Create book.
      Book book1 = new Book("RESTEasy: the Sequel");
      int id1 = remoteResource.createBook(book1);
      log.info("id1: " + id1);
      Assert.assertEquals(Counter.INITIAL_VALUE, id1);
     
      // Create another book.
      Book book2 = new Book("RESTEasy: It's Alive");
      int id2 = remoteResource.createBook(book2);
      log.info("id2: " + id2);
      Assert.assertEquals(Counter.INITIAL_VALUE + 1, id2);
     
      // Retrieve first book.
      Book bookResponse1 = remoteResource.lookupBookById(id1);
      log.info("book1 response: " + bookResponse1);
      Assert.assertEquals(book1, bookResponse1);

      // Retrieve second book.
      Book bookResponse2 = remoteResource.lookupBookById(id2);
      log.info("book2 response: " + bookResponse2);
      Assert.assertEquals(book2, bookResponse2);
     
      // Verify that EJBBookReader and EJBBookWriter haven't been used.
      remoteResource.testUse(0);
     
      // Reset counter.
      remoteResource.reset();
   }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.cdi.ejb.EJBRemoteResource

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.