4.5.1 Visual Basic Client Example: Using the Bootstrap Object
The following code snippet shows how to program a Visual Basic client to use the Bootstrap object.
‘Declare the Bootstrap object
Public oBootstrap As DITobj_Bootstrap
‘Declare the FactoryFinder object
Public oBsFactoryFinder As DITobj_FactoryFinder
‘Declare factory for Registrar object
Public oRegistrarFactory As DIUniversityB_RegistrarFactory
‘Declare actual Registrar object
Public oRegistrarFactory As DIUniversityB_RegistrarFactory
....
‘Create the Bootstrap object
Set oBootstrap = CreateObject(“Tobj.Bootstrap”)
‘Connect to the Oracle Tuxedo Domain
oBootstrap.Initialize “//host:port”
‘Get the FactoryFinder for the Oracle Tuxedo Domain
Set oBSFactoryFinder = oBootstrap.CreateObject(“Tobj.FactoryFinder”)
‘Get a factory for the Registrar object
‘using the FactoryFinder method find_one_factory_by_id
Set oRegistrarFactory =
oBSFactoryFinder.find_one_factory_by_id(“RegistrarFactoryID”)
'Create a Registrar object
Set oRegistrar = oRegistrarFactory.find_registrar(exc)
Parent topic: Bootstrap Object Programming Examples