[omniORB] Problems with returning an object
Kevin Bailey
ke-omniorb@retriever.dyndns.org
Fri, 3 Aug 2001 17:25:22 -0700
On Fri, Aug 03, 2001 at 04:35:18PM -0700, Thomas Amsler wrote:
> I am having problems returning an object within a method. In the method
> authenticate, I try to return an AuthResponse object. I am not sure on
> how to do that.
In CORBA, you don't really pass objects around as you pass
object _references_. Assuming AuthResponse_i is a CORBA
derived class, you'd do something like:
// Implicit activation (there other ways to activate objects)
AuthResponse_var r_response = pr_auth_response->_this();
return r_response._retn();
Of course, you must handle object deactivation also.
You MUST get Henning & Vinoski's "Advanced CORBA Programming
with C++".