Example: Main Client Program
static public void main(String[] args) {
CORBA.ORB orb = CORBA.ORB.init(); // Initialize the ORB
// binding by name to the Counter instance on the server
Counter.Count counter = Counter.Count_var.bind(“My Count”);
counter.sum(0); // initialize counter to zero
long startTime = System.currentTimeMillis();
for(int j=0; j j++) { // now increment 1000 times by
counter.increment(); // calling increment() method on server object
long stopTime = System.currentTimeMillis();
System.out.println((stopTime-startTime)/1000f);
} catch(CORBA.Exception e) { System.err.println(e); }
Note: This code is created by the developer
This becomes general hierarchical address for arbitrary server