ODB

The odb example shows how an arbitrary number of Objects can be created by a service. The Reference data used by each Object is stored as part of the IOR. Only the service gets registered with an agent and not individual Objects. This facilitates OODB integration - Can store object keys as part of Object Reference. The BOA will call user defined Activators if the appropriate object is not yet created (The application can then load the object from persistent storage).



From this example, you will learn how to:

Directory Contents

Building this example

Typing make(vbmake on Windows) in the odb subdirectory will cause the following classes to be built:

Compilation Errors and Warnings

You will see the following compilation warnings when you type make(vbmake on Windows) in the odb subdirectory or when you explicitly compile Client.java and Creator.java using: These warnings occur because the example uses a Java API that has been deprecated since JDK1.1. The calls to the deprecated Java API have not been changed for the sake of JDK1.0.2 users.
You may also see the following compilation error when you compile this example using either JDK1.0.2 or JDK1.1.1: The above error occurs because the javac compiler in JDK1.0.2 and JDK1.1.1 cannot locate packages imported from JAR files. The solution to this problem is to either:

Running this example

To run the examples, first make sure that the VisiBroker Smart Agent (osagent executable) is running on your network. Then start the server using the command: Next, run the creator: The creator program creates 100 objects, writes the object references to a file and exits.

Kill the server that you started above. Then, restart it  by typing the command:

Next, run the client. The client reads the object references from the file and calls get_name on them.


Return to the top-level examples page.