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).
IDL interface or DB and DBObject.
Use the Service/Activators to create objects, return them and deletes them.
Calls the DB interface to create 100 objects and stores the "stringified
object references" in a file.
Reads the "stringified object references" from the file
and makes calls on them. This would have the effect of Activators
getting called on the server to create the objects.
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:
prompt> vbj Server -OAport 12345 & (start vbj Server -OAport 12345 on Windows) // Run Server in the background
Note that we specify a particular OAport for the server to start. Next, run the creator:
prompt> vbj 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 with the same
OAport number 12345 used above by typing the command:
prompt> vbj Server -OAport 12345 & (start vbj Server -OAport 12345 on Windows) // Run Server in the background
Next, run the client.
prompt> vbj Client
The client reads the object references from the file and calls get_name
on them.