/* * * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. * * This software is the proprietary information of Sun Microsystems, Inc. * Use is subject to license terms. * */ import javax.naming.Context; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; import Confirmer; import ConfirmerHome; public class ConfirmerClient { public static void main(String[] args) { try { String recipient = "murphy@cloverave.com"; Context initial = new InitialContext(); Object objref = initial.lookup("MyConfirmer"); ConfirmerHome home = (ConfirmerHome)PortableRemoteObject.narrow(objref, ConfirmerHome.class); Confirmer confirmer = home.create(); confirmer.sendNotice(recipient); } catch (Exception ex) { System.err.println("Caught an unexpected exception!"); ex.printStackTrace(); } } }