FileDocCategorySizeDatePackage
Client.javaAPI DocJBoss 4.2.12054Fri Jul 13 20:55:04 BST 2007org.jboss.tutorial.relationships.client

Client

public class Client extends Object
Comment
author
Bill Burke
version
$Revision: 57207 $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

      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());

      }
      System.out.println("USAir customers");

      for (Customer c : two.getCustomers())
      {
         System.out.println(c.getName());
      }