1 | public class CounterClient |
2 | { |
3 | public static org.omg.CORBA.ORB orb; |
4 | public static Counter.Count counter; |
5 | public static void main (String args[]) { |
6 | try { |
7 | orb = org.omg.CORBA.ORB.init(args, null); |
8 | org.omg.CORBA.Object objRef = |
9 | orb.resolve_initial_references("NameService"); |
10 | NamingContext ncRef = |
11 | NamingContextHelper.narrow(objRef); |
12 | NameComponent nc = new |
13 | NameComponent("Counter", ""); |
14 | NameComponent path[] = {nc}; |
15 | counter = |
16 | Counter.CountHelper.narrow(ncRef.resolve(path)); |