FileDocCategorySizeDatePackage
Client.javaAPI DocJBoss 4.2.11870Fri Jul 13 20:55:22 BST 2007org.jboss.tutorial.tableperinheritance.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();
      PetDAO dao = (PetDAO) ctx.lookup("PetDAOBean/remote");

      dao.createCat("Toonses", 15.0, 9);
      dao.createCat("Sox", 10.0, 5);
      dao.createDog("Winnie", 70.0, 5);
      dao.createDog("Junior", 11.0, 1);

      List l = dao.findByWeight(14.0);
      for (Object o : l)
      {
         System.out.println(((Pet) o).getName());
      }