Mastering PowerBuilder

HomePrevious Lesson: Stubs and skeletons
Next Lesson: CORBAservices

Static and dynamic invocation

CORBA supports both compile-time static linking and run-time dynamic invocation interfaces for components on the object bus. The word "common" in "Common Object Request Broker Architecture" refers to its support for both static and dynamic invocation.

Static invocations are simpler to program, more efficient and easier to understand.

Dynamic invocations are more complex to program, but they offer more flexibility. For example, you would use an ORB�s dynamic invocation facilities to write a tool that browsed for and invoked available components at run time.

In general, you would use static invocation unless there was a compelling reason to use dynamic invocation. The server cannot tell whether its methods were invoked statically or dynamically.

With either type of invocation, a CORBA client needs to initialize the CORBA environment (specifically the ORB) then obtain an object reference (or proxy object) for the server object, before it can invoke methods on the server object. The steps for initializing the ORB and obtaining an object reference differ by ORB vendor and platform. In contrast, once you have a local proxy object for a remote CORBA object, you invoke methods on it just as you would a non-CORBA object, using the syntax that is standard for the programming language.
HomePrevious Lesson: Stubs and skeletons
Next Lesson: CORBAservices