All pastes #376213 Raw Edit

Someone

public java v1 · immutable
#376213 ·published 2007-02-28 22:26 UTC
rendered paste body
package bank;import java.io.*;import org.omg.CORBA.*;import org.omg.CosNaming.*;import java.util.*;import java.text.*;public class BankClient {    public static void main(String args[]) {        try {            // create and initialize the ORB            ORB orb = ORB.init(args, null);                        // get a reference to the naming service            org.omg.CORBA.Object o = orb.resolve_initial_references("NameService");            NamingContextExt rootContext = NamingContextExtHelper.narrow( o );                        // Find a name with a context called MyServer.CalcServer            NameComponent nc = new NameComponent("MyServer", "BankServer");            NameComponent path[] = {nc};            bank.Manager managerRef = bank.ManagerHelper.narrow(rootContext.resolve(path));                        System.err.println("Object Reference successfully imported from Naming Service. \n");                        UserInterface ui = new UserInterface(managerRef);            ui.run();                    }                        catch (Exception e) {            System.err.println("ERROR : " + e) ;            e.printStackTrace(System.out);        }    }}