Examples of EntityTest


Examples of org.jboss.test.jpa.entity.EntityTest

      assertTrue(c.getFlights().size() == 1);
   }

   public void testFieldManyToMany() throws Exception
   {
      EntityTest test = (EntityTest) this.getInitialContext().lookup("EntityTestBean/remote");
      test.fieldManyToManyCreate();

      FieldFlight one = test.fieldFindFlightById(new Long(1));
      assertTrue(one.getCompany().getName().equals("Air France"));

      FieldFlight two = test.fieldFindFlightById(new Long(2));
      assertTrue(two.getCompany().getName().equals("USAir"));

      System.out.println("Air France customers");
      for (FieldCustomer c : one.getCustomers())
      {
View Full Code Here

Examples of org.jboss.test.jpa.entity.EntityTest

   }

   public void testNamedQueries() throws Exception
   {
      EntityTest test = (EntityTest) this.getInitialContext().lookup("EntityTestBean/remote");
      test.testNamedQueries();     
   }
View Full Code Here

Examples of org.jboss.test.jpa.entity.EntityTest

      test.testNamedQueries();     
   }

   public void testOutsideTx() throws Exception
   {
      EntityTest test = (EntityTest) this.getInitialContext().lookup("EntityTestBean/remote");
      test.testOutsideTransaction();     

   }
View Full Code Here

Examples of org.jboss.test.jpa.entity.EntityTest

   }
  
   public void testFlush() throws Exception
   {
      EntityTest test = (EntityTest) this.getInitialContext().lookup("EntityTestBean/remote");
      Customer c = test.createCustomer("Emmanuel");
    test.changeCustomer(c.getId(), "Bill");
    Customer c2 = test.loadCustomer(c.getId());
    assertEquals("Bill", c2.getName());
   }
View Full Code Here

Examples of org.jboss.tutorial.cachedentity.bean.EntityTest

      prop2.put("java.naming.provider.url", "jnp://" + args[1]);

      System.out.println("Saving customer to node1 = " + args[0]);
      InitialContext ctx1 = new InitialContext(prop1);

      EntityTest tester1 = (EntityTest)ctx1.lookup("EntityTestBean/remote");
      Customer customer = tester1.createCustomer();
      customer = tester1.findByCustomerId(customer.getId());

      System.out.println("Looking for customer on node2 = " + args[1] + " (should be available in cache)");
      InitialContext ctx2 = new InitialContext(prop2);

      EntityTest tester2 = (EntityTest)ctx2.lookup("EntityTestBean/remote");

      Set<Contact> contacts = customer.getContacts();

      customer = tester2.findByCustomerId(customer.getId());
      if (customer == null)
      {
         throw new RuntimeException("Customer was not found in node2 = " + args[1]);
      }
      System.out.println("Found customer on node2 (cache). Customer details follow:");
View Full Code Here

Examples of org.jboss.tutorial.composite.bean.EntityTest

public class Client
{
   public static void main(String[] args) throws Exception
   {
      InitialContext ctx = new InitialContext();
      EntityTest test = (EntityTest) ctx.lookup("EntityTestBean/remote");
      test.manyToManyCreate();

      Flight one = test.findFlightById(new Long(1));

      Flight two = test.findFlightById(new Long(2));

      System.out.println("Air France customers");
      for (Customer c : one.getCustomers())
      {
         System.out.println(c.getName());
View Full Code Here

Examples of org.jboss.tutorial.relationships.bean.EntityTest

public class Client
{
   public static void main(String[] args) throws Exception
   {
      InitialContext ctx = new InitialContext();
      EntityTest test = (EntityTest) ctx.lookup("EntityTestBean/remote");
      test.manyToManyCreate();

      Flight one = test.findFlightById(new Long(1));

      Flight two = test.findFlightById(new Long(2));

      System.out.println("Air France customers");
      for (Customer c : one.getCustomers())
      {
         System.out.println(c.getName());
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.