Title: CORBA Object Browser
1CORBA Object Browser
- Versatile DII lets you discover and use a CORBA
object at runtime without compiling stubs
Article by Poornachandra G. Sarang Mohan
Rajagopalan From Java Developers Journal (Vol.
4, Issue 6, June 1999) Presentation by Lara J.
Bordick
2Background
- CORBA provides platform, location and
implementation neutral architecture. - Wanted to be able to use available CORBA services
on the web. - You might not know the properties of the service
ahead of time. - Dynamic Invocation allows you to learn the
properties and use the services at runtime. (Like
Reflection in Java)
3Dynamic Invocation Interface (DII)
- A CORBA object publishes its Interface Definition
Language (IDL). - The CORBA architecture has an Interface
Repository (IR) that allows the CORBA object to
publish its IDL. - Client gets a reference to the server object and
retrieves the IDL from the IR. - The DII allows the user to invoke the methods on
the server object.
4A Benefit
- Client can learn about services
- Sever/ Publisher can add new features to an
object after deployment. - So, developers can modify previously published
objects without the need to recompile and
redistribute client-side stubs.
5An Example
- CORBA application that acts as an on-line store
- Initial implementation allows customers to visit
and make purchases but send payment via regular
mail - New implementation allows credit card payment
- Add a credit card purchase method to the server
object - If you used DII, then the client can discover
the new method instead of having to get a new
compiled stub
6Details How the CORBA Object Browser Works.
- Browser built with Java and JFC classes.
- User specifies a reference to an existing CORBA
server object. - Objects are known because they are registered
with a CORBA Naming Service.
7The Naming Services
- An object is registered with the CORBA Naming
Service using a bind or rebind to the ORB - Client calls resolve_initial_reference() method
of the ORB
or
- An object is registered with the URL Naming
Service - Client refers to a URL and clients can access
objects on Orb's at different machines - Publisher must publish a special file on a web
server so the client can find it
8Interface Repository
- Stores IDL definitions for CORBA objects
- On-line database for storing the definition of
the interfaces - An example
/ File abcom.jr Date Sat Jan 30 065840
GMT0000 1999 User Administrator Dir
C\Objectbrowser/module bank interface
TermDeposit interface TermDeposti attribute
float Interest float Compute in float
Principal in short Period )
9User Interface
10User Interface Description
- User enters name of server object
- User clicks Introspect Button
- Object is located and the browser displays the
IDL - User clicks the Operation and Attribute Listing
tab - Various operations and attributes are displayed
- Click on an attribute to see its properties
- Click on a method to get a window where
parameters can be set (no validation yet) - Click on Invoke button to invoke the server
method
11Browser Design
12Browser Design Description
- Composed of 7 public classes
- ObjectBrowser (main user interface)
- InputPanel, OutputPanel, StatusBar (interface
components) - BackEnd (CORBA related activities)
- AttributeDescription and OperationDescriptionTable
(helper classes)
13Running the browser
- Browser is buit with JDK 1.1.5 and swing classes
- Batch file compiles all the source code
- Must start OSAgent, Naming Service, etc.
- Run object browser vbj -DORBservicesCosNaming
-DSVnamerootABCOM -VBJclasspath SWINGPATH
ObjectBrowser
14Conclusion
- DII is very complex
- DII is very versatile
- Article has complete implementation steps
- Source code available at www.JavaDevelopersJournal
.com - Good building block for real applications
- Still needs polishing before marketable on a
large scale