[omniORB] Callback problem
Andrew Parkin
AndrewP@eigroup.com
Fri, 16 Feb 2001 16:23:28 -0000
Thanks to everyone who replied and pointed out what I was doing wrong - I
have now got the callbacks working!
Cheers
Andrew
> -----Original Message-----
> From: Duncan Grisby [mailto:dgrisby@uk.research.att.com]
> Sent: 16 February 2001 15:34
> To: omniorb-list@uk.research.att.com
> Subject: Re: [omniORB] Callback problem
>
>
> On Friday 16 February, Andrew Parkin wrote:
>
> > /** IMPLEMENTATION OF CorbaRemoteSMListener */
> > class CorbaRemoteSMListenerImpl: sms::_impl_CorbaRemoteSMListener
>
> You should never derive from the _impl class. It's an internal omniORB
> specific thing. You should derive your servant class from
> POA_sms::CorbaRemoteSMListener.
>
> > /** CODE TO PASS THE CALLBACK */
> > CorbaRemoteSMListenerImpl* corbaRemoteSMListenerImpl = new
> > CorbaRemoteSMListenerImpl();
> > CORBA::String_var ticketID = e->submitMessageGetEvents(msgStruct,
> > (sms::_objref_CorbaRemoteSMListener*)corbaRemoteSMListenerImpl);
>
> As Stefan has already posted, code which has to subvert the C++ type
> system is usually wrong. This code certainly is. You should use the
> proper POA functions.
>
> I strongly recommend that you study the omniORB example programs, and
> get hold of a good book on the CORBA C++ mapping. "Advanced CORBA
> Programming with C++" by Henning and Vinoski is the best bet. Don't be
> put off by the "Advanced" in the title -- it starts out with the
> basics.
>
> Cheers,
>
> Duncan.
>
> --
> -- Duncan Grisby \ Research Engineer --
> -- AT&T Laboratories Cambridge --
> -- http://www.uk.research.att.com/~dpg1 --
>