Basic HTML version of Foils prepared May 19 1999

Foil 88 Example 2: Client-side Java Code

From CORBA Common Object Request Broker Architecture Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Geoffrey Fox, Wojtek Furmanski, Nancy McCracken, Chao-Wei Ou, Shrideep Pallickara


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));

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999