Re: workflow of ORBacus

David Weir <[email protected]>
Newsgroups gmane.comp.corba.orbacus
Organization Object Oriented Concepts, Inc. - An IONA Company
Message-ID <[email protected]>
Hello Halil,

On Thu, Dec 23, 2004 at 10:34:12AM +0200, Halil AKINCI wrote:
> Hi,
> 
> I want to trace workflow of remote method invocation between client 
> and server. For example, 
> 
> 1- A client receives an remote object reference and calls a remote method. 
> 2- Stub class creates an OutputStream (out), writes methods parameters to out.
> 3- Stub calls _invoke(out) method of the ObjectImpl class.
> 4- _invoke method returns a delegate object and its invoke(this,out) method is called.
> 5- invoke method of the delegate returns a DowncallStub object
> 6- downcallStub object has another invoke method and this method is called.  
> 7- it retuns an Downcall object and its postMarshall() method is called.
> 
> I lost my trace from here. Which classes or components take OutputStream, 
> create a GIOP message, open a connection to server, and send message from 
> client to server?

The answer depends on your configuration and the version of Orbacus that
you are using. The area you are interested in was modified significantly
between Orbacus 4.1.x and 4.2.x.

That being said, for version 4.2.1 and the default configuration, the client 
call stack (just prior to sending a message) for the "hello" demo looks like this:

OCI::IIOP::Transport_impl::sendImpl()  
OCI::IIOP::Transport_impl::send()  
OB::ThreadedGIOPConnectionHandler::send()  
OB::ThreadedGIOPConnectionHandler::sendReceive()  
OB::Downcall::request()  
OB::MarshalStubImpl::_OB_request()  
OBMarshalStubImpl_Hello::say_hello()  
OBProxy_Hello::say_hello()  
run(CORBA::ORB * orb=0x00329234, int __formal=1, char * * 
    argv=0x00325690)
main(int argc=1, char * * argv=0x00325690, char * * __formal=0x003233f8)

Take a look at the "GIOPConnection" class, in particular the
"processMessage" function, for a good starting point.
 
> And in the server, which classes and components receive message, parse it, 
> find POA, find servant and dispatch request message to correspond servant?
>
> thanks...

You should be able to step through the server code to produce a similar
stack trace. The "GIOPConnection" class is also used by the server side
to process messages, so be careful to keep the proper context in mind
when you are reading the code. Another class that is important on the
server side is the "Upcall" class, but there are many more that play 
important roles in delivering a message to the servant.
 
More detailed information would go beyond the scope of this mailing
list. I suggest finding a good debugger like GDB or Visual Studio and
stepping through the code to see what classes are being used, and under
what circumstances.

Cheers,
Dave

-- 
David Weir                          
Team Orbacus - Your CORBA Source
E-Mail: [email protected]
Phone: (709) 738-3725 x20
WWW: http://www.orbacus.com
_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.