FileDocCategorySizeDatePackage
Client_3.javaAPI DocExample938Sun Mar 07 08:34:44 GMT 1999com.titan.ship

Client_3

public class Client_3 extends Object

Fields Summary
Constructors Summary
Methods Summary
public static javax.naming.ContextgetInitialContext()

        Properties p = new Properties();
        // ... specify the JNDI properties specific to the vendor
        return new InitialContext(p);
    
public static voidmain(java.lang.String[] args)

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