It seems that the two functions of ObjectPrx conflict:
The requests always go to (tcp -h 10.10.10.1 -p 10001) and never go to (tcp -h 10.10.10.1 -p 10000).Code:int status = 0; Ice.Communicator ic = null; try { ic = Ice.Util.initialize(args); Ice.ObjectPrx base = ic.stringToProxy( "SimplePrinter:tcp -h 10.10.10.1 -p 10001:tcp -h 10.10.10.1 -p 10000"); base = base.ice_endpointSelection(Ice.EndpointSelectionType.Ordered); base = base.ice_connectionCached(false); Demo.PrinterPrx printer = Demo.PrinterPrxHelper.uncheckedCast(base); while (true) { Scanner in = new Scanner(System.in); System.out.print("Input something to start the continue:"); String name = in.nextLine(); if (name.compareTo("exit") == 0) break; printer.printString("I am testing"); } } //...
BTW, my environment:
Code:IceJ 3.1.1 Windows XP java 1.5

Reply With Quote

