Package org.jboss.tutorial.extended.bean

Examples of org.jboss.tutorial.extended.bean.StatelessRemote.find()


      ShoppingCart test = (ShoppingCart) getInitialContext().lookup("ShoppingCartBean/remote");
      StatelessRemote remote = (StatelessRemote) getInitialContext().lookup("StatelessSessionBean/remote");
      Customer c;

      long id = test.createCustomer();
      c = remote.find(id);
      System.out.println("Created customer: " + c.getName());

      test.update();
      c = remote.find(id);
      System.out.println("ShoppingCartBean.customer should stay managed because we're in an extended PC: Customer.getName() == " + c.getName());
View Full Code Here


      long id = test.createCustomer();
      c = remote.find(id);
      System.out.println("Created customer: " + c.getName());

      test.update();
      c = remote.find(id);
      System.out.println("ShoppingCartBean.customer should stay managed because we're in an extended PC: Customer.getName() == " + c.getName());

      test.update3();
      c = remote.find(id);
      System.out.println("Extended persistence contexts are propagated to nested EJB calls: Customer.getName() == " + c.getName());
View Full Code Here

      test.update();
      c = remote.find(id);
      System.out.println("ShoppingCartBean.customer should stay managed because we're in an extended PC: Customer.getName() == " + c.getName());

      test.update3();
      c = remote.find(id);
      System.out.println("Extended persistence contexts are propagated to nested EJB calls: Customer.getName() == " + c.getName());
      test.checkout();
   }

   public static void testWithFlushMode() throws Exception
View Full Code Here

      Customer c;
      long id;


      id = cart.createCustomer();
      c = dao.find(id);
      System.out.println("Created customer: " + c.getName());

      cart.never();
      c = dao.find(id);
      System.out.println("Customer's name should still be William as pc was not yet flushed:  Customer.getName() == " + c.getName());
View Full Code Here

      id = cart.createCustomer();
      c = dao.find(id);
      System.out.println("Created customer: " + c.getName());

      cart.never();
      c = dao.find(id);
      System.out.println("Customer's name should still be William as pc was not yet flushed:  Customer.getName() == " + c.getName());

      cart.checkout();
      c = dao.find(id);
      System.out.println("Now that the pc has been flushed name should be 'Bob': Customer.getName() == " + c.getName());
View Full Code Here

      cart.never();
      c = dao.find(id);
      System.out.println("Customer's name should still be William as pc was not yet flushed:  Customer.getName() == " + c.getName());

      cart.checkout();
      c = dao.find(id);
      System.out.println("Now that the pc has been flushed name should be 'Bob': Customer.getName() == " + c.getName());

   }

   public static void main(String[] args) throws Exception
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.