VisiBroker for Java Examples
Directory Contents
-
The Bank Example
This subdirectory contains the "Bank" example application developed
in several chapters of the VisiBroker for Java Programmer's Guide. This
example has two simple interfaces supporting two operations - open, to
open a bank account and balance, to query the balance in the user's account.
The other examples based on the Bank example are portable_bank,
bank_using_tie, dynamic_bank,
event_bank, and URLNaming_bank.
-
Portable_Bank
This subdirectory contains the portable bank example and illustrates
how to write portable CORBA applets and applications that should run
in any vendor's ORB implementation.
-
Bank_Using_TIE
This subdirectory contains the bank example and illustrates the implementation
of the Bank Server using the TIE mechanism.
-
Dynamic Bank Example(DII/DSI)
This subdirectory contains the bank example, where the client is implemented
using DII (Dynamic Invocation Interface) and the Server is implemented
using DSI (Dynamic Skeleton Interface).
-
Dynamic Any
This subdirectory contains an example illustrating the basic facilities
associated with Dynamic Anys.
-
Event Handler example
This subdirectory contains the bank example showing how to use the
Event Handler API provided by VisiBroker for Java and create communication
event handlers for client applications and object implementations.
-
Encryption example
This subdirectory contains the encryption example illustrating the use
of interceptors to encrypt data passed between the client and server.
-
The Interceptor examples
This subdirectory has two examples: sampleInterceptor
and timerInterceptor. The interceptor
examples are based on the Bank Example described
above. They illustrate how to create an interceptor and associate it with
the ORB. They also show how to add simple tracing or timing information
to an existing client or server without modifying source code.
-
The IR examples
This subdirectory contains two examples, one of which looks up the
interface associated with a given IDLname in the Interface Repository.
The second one traverses the IR as a container and prints all the contents
in an IDL-like fashion. These examples show how to bind to, query and traverse
the IR.
-
locate
This subdirectory contains examples using the Location Service provided
by VisiBroker for Java. The example demonstrates how
to bind to and query the OSAgent to obtain information about all accessible
Globally scoped objects. It also shows how to implement triggers which
will be notified as Globally scoped instances become available.
-
ORB Manager
This subdirectory contains an example that uses the orb manager to get
and set attributes of an implementation.
-
odb
This subdirectory contains an example that uses a factory to create
an arbitrary number of objects provided through a Service Activator.
The objects may be activated and deactivated dynamically, simulating what
is required when integrating VisiBroker servers with an Object Database.
-
The Pass_by_value examples
The pass_by_value subdirectory contains two examples, the Dictionary
and the List. These examples
illustrate the use of the Caffeine compiler (java2iiop) to generate client
stubs and server skeletons from interface definitions written in Java instead
of IDL. They also illustrate how to work with complex data types - in particular,
passing by value using extensible structs.
-
The Smart Stub Example
The smart_stub subdirectory contains an example that shows how to cache
information from server objects and reduce the number of actual server
requests a client has to make. This feature is depricated, please see
Object Wrappers
for alternate mechanisms.
-
The Object Wrapper Example
The object_wrapped_bank subdirectory contains an example showing how
to use Object Wrappers to perform various tasks like Caching, Argument validation
Tracing and timing of functions etc.
-
The URLNaming Example
The URL Naming example illustrates how a client can obtain a reference
to an object by specifying the URL associated with an object's IOR instead
of using the object name.
-
Makefile (vbmake.bat for Windows users):
Used to build all the examples.
Building examples
Typing make all (or vbmake all on Windows) in the current
directory will cause all of the executables(classes) to be built in all
the example subdirectories.
Building a specific example
To build a specific example, cd to the specific example subdirectory
and then type make all. If you are using the product on Windows
based systems, type vbmake all instead.