Instantiating proxies using CORBA-style interfaces  Creating a Manager instance

Chapter 20: Creating ActiveX Clients

Initializing the ORB

Before any ORB classes can be used, you must call the init method, which:


Initialization parameters

The ORB.init() method acceps a formatted string that can contain settings for multiple initialization parameters. Pass initialization parameters as shown in this example, which configures the -ORBlogFile property and the -ORBpin property, to specify a file name for logging errors and the Sybase SSL-certificate-database password, respectively:

orb.init("-ORBlogFile=d:\jagorb.log,-ORBpin=sybase")

As shown in the example, parameter names and values must be separated by an equals sign, ‘=’, and each name/value pair must be separated from the next with a comma and no white space.

For each initialization parameter, there is an equivalent environment variable. If the environment variable and initialization parameter are set, the value of the initialization parameter is used. Parameter and environment variable names are the same as for the C++ client ORB (see Chapter 15, “Creating CORBA C++ Clients”).

You can set any initialization parameter to a value of none, which overrides the value of the environment variable and sets the value to the default, if any.

You can pass the following initialization parameters to the driver class:


Example: ORB initialization

ORB initialization is demonstrated in the following example.

Dim orb As ORB
Dim Manager As Manager
Dim Session As Session
Dim Factory As Factory

' Create a new ORB object
Set orb = New ORB

' Initialize the ORB instance
orb.init ("")

init returns an object reference to the EAServer ORB. When orb is deallocated or assigned a new object reference, it will be automatically released.





Copyright © 2005. Sybase Inc. All rights reserved. Creating a Manager instance

View this book as PDF