try{
Context ctx = getInitialContext();
ShipHome home = (ShipHome)ctx.lookup("ShipHome");
Enumeration enum = home.findByCapacity(4500);
while(enum.hasMoreElements()){
Ship aShip = (Ship)enum.nextElement();
System.out.println(aShip.getName());
}
}catch(Exception e){e.printStackTrace();}