Archived

This forum has been archived. Please start a new discussion on GitHub.

How to change the ObjectPrx transparently in the Client side

Hi

I would like to ask a question about changing the objectPrx in java.

In the Client side:
Print.PrinterPrx pprx =Print.PrinterPrxHelper.checkedCast(objectprx);
try{
       	pprx.Printing(line);
catch(forward.RedirectException rde){
       	pprx = Print.PrinterPrxHelper.checkedCast(//new objectPrx here);
}

In my program, When the client receive a exception, it will change the objectprx in pprx, but I think that it is not transparently enough in the client. Without using the PrinterPrxHolder, How can I change the objectPrx more transparently in the client? Or I need to do this in the other Internal layer like PrinterPrxHelper.java, PrinterDelM.java, PrinterDelD.java...etc

Thx a lot !!!!!!!!:o

Comments

  • matthew
    matthew NL, Canada
    Proxies are immutable, so if you want them to change transparently then you'll have to wrap them somehow as you suggest.
  • As I know that CORBA have Object Wrapper
    Does ICE have an Object Wrapper or other function like Object Wrapper ?

    Thanks~!
  • matthew
    matthew NL, Canada
    What CORBA object wrapper are you talking about precisely?