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


public class CounterClient
{
public static org.omg.CORBA.ORB orb;
public static Counter.Count counter;
public static void main (String args[]) {
try {
orb = org.omg.CORBA.ORB.init(args, null);
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
NamingContext ncRef =
NamingContextHelper.narrow(objRef);
NameComponent nc = new
NameComponent("Counter", "");
NameComponent path[] = {nc};
counter =
Counter.CountHelper.narrow(ncRef.resolve(path));



© 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