public static void main(String args[]) {
try {
// create and initialize the ORB
ORB orb = ORB.init(args, null);
// create an implementation and register it with the ORB
AddImpl impl = new AddImpl(orb);
// get reference to rootpoa & activate the POAManager
POA rootpoa =
POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
rootpoa.the_POAManager().activate();
// get object reference from the servant
org.omg.CORBA.Object ref = rootpoa.servant_to_reference(impl);
Add href = AddHelper.narrow(ref);
// get the root naming context
// NameService invokes the name service
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
// Use NamingContextExt which is part of the Interoperable
// Naming Service (INS) specification.
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
// bind the Object Reference in Naming
String name = "Add";
NameComponent path[] = ncRef.to_name(name);
ncRef.rebind(path, href);
System.out.println("AddServer ready to add up your arrays....");