Object Models and Java

By Jean-Marie Chauvet and Marc Lerman

Dr. Dobb's Journal December 1997

(a)
account.Ref accountRef  = null;
try{
    accountRef = account._bind( ":account", "pc48" );
}
catch (IE.Iona.Orbix2.CORBA.SystemException se) {
    System.out.println("Unexpected exception:" );
    System.out.println(se.toString());
    return;
}
(b)
try{
    accountRef.makeWithdrawal( amount );
}
catch (IE.Iona.Orbix2.CORBA.SystemException se) {
    //  Handle exception here
    return;
}

Example 3: (a) Standard sequence of operations for the Java client; (b) once bound, the remote CORBA object is used like any other local Java object.

Back to Article


Copyright © 1997, Dr. Dobb's Journal