import java.io.*;
import java.util.*;
import Server.*;
import Server.ProcessHitsCollectionPackage.*;

class ProducerApp {
    public static void main( String[] args )  throws Exception{
        ProcessHitsCollection s = null;
        Properties props = System.getProperties();
        props.put("org.omg.CORBA.ORBClass", "com.ooc.CORBA.ORB");
        props.put("org.omg.CORBA.ORBSingletonClass", "com.ooc.CORBA.ORBSingleton
");
        org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init( args, props );
        System.out.println("[client] orb.inirialized");
        BufferedReader input = new BufferedReader( new FileReader(args[0]));
        String obj_ref = input.readLine();
        System.out.println( "[client] got a stringified object reference :");
        System.out.println( obj_ref );
        org.omg.CORBA.Object object = orb.string_to_object(obj_ref);

        s = ProcessHitsCollectionHelper.narrow( object );
        int sLength;
        Hit aHit = new Hit();
        System.out.println("*** This CXX Client of ProcessHitsCollection***\n");
        System.out.println("    Enter 'postive integer' for send data or '0' to 
exit:\n");
        sLength = (args.length>=2)? Integer.parseInt(args[1]):3;
        Hit[] aHC = new Hit[sLength];

        // Set values
        for(int i=0; i