// OrderPlacementClient.java
// mini Client for accessing bean OrderPlacement

package org.objectweb.jonas.stests.appli;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;

/**
 *
 */
public class OrderPlacementClient {

    static Context ctx = null; 
    static OrderPlacementHome home = null;

    public static void main(String[] arg) {

	// Get InitialContext
	try {
	    ctx = new InitialContext();
	} catch (NamingException e) {
	    e.printStackTrace();
	    System.exit(2);
	}

	// Lookup bean home 
	String bName = "OrderPlacementHome";
	try {
	    home = (OrderPlacementHome) PortableRemoteObject.narrow(ctx.lookup(bName), OrderPlacementHome.class);
	    OrderPlacement bean = home.create();
 
	} catch(Exception e) {
	    e.printStackTrace();
	    System.exit(2);
	}

	// ...
    }
}
