Cleaning up client resources  Handling exceptions

Chapter 12: Creating CORBA Java Clients

Serializing component instance references

You can call the ORB.object_to_string() and ORB.string_to_object() methods to serialize and deserialize proxy object references. Assuming that the proxy interface is Payroll, this call serializes a proxy component reference:

  Payroll payroll; 
... deleted code that instantiates payroll ...

  String payroll_ior = orb.object_to_string(payroll);

This call deserializes the reference:

  Payroll payroll = PayrollHelper.narrow(

The following restrictions apply when serializing and deserializing component proxy references:

Copyright © 2005. Sybase Inc. All rights reserved. Handling exceptions