/* Generated by Together */

package client.weblogic;

import javax.naming.*;
import java.util.Properties;
import hello.*;

/**
 * @author TogetherSoft
*/
public class HelloClient {
    public static void main(String[] argv) {
        try{
            Properties props = System.getProperties();
            props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
            props.put(Context.PROVIDER_URL, "t3://localhost:7001");
            Context ctx = new InitialContext(props);
            HelloHome home = (HelloHome)javax.rmi.PortableRemoteObject.narrow(ctx.lookup("hello.HelloHome"),HelloHome.class);
            Hello hello = home.create();
            System.out.println(hello.hello());
            hello.remove();
        }catch(Exception e){ e.printStackTrace(); }
    }
}
