community.borland.com

Article #21772: Deploying a Delphi/VisiBroker Application

This article discusses the process of deploying a Delphi application that uses CORBA. Often there is confusion over what part Delphi plays versus what part VisiBroker plays, and exactly what is needed from each. This document will attempt to clarify this.

Deploying a Delphi/CORBA app is not an exact science. Much depends on what components you are using, and what files already exist on the deployment machine. For the purpose of this article it is assumed you are deploying to a machine which contains Windows NT and nothing else. It is also assumed that you know how to create a Delphi CORBA application, and how to deploy a basic Delphi application without CORBA. When deploying a Delphi application you must use a Borland certified deployment utility such as InstallShield Express. Using this utility helps insure that the Delphi files your application needs are included in your deployment.


Background Information

VisiBroker for Delphi uses the VisiBroker C++ ORB. The C++ ORB has been encapsulated with Delphi code. This code is contained in the library orbpas50.dll. This approach provides the Delphi community with a fast and stable industry-standard ORB and avoids the need to develop and maintain a new ORB from scratch.

Applications built with VisiBroker for Delphi require both the VisiBroker for Delphi runtime and the VisiBroker for C++ runtime. Orbpas50.dll is a Delphi wrapper around the C++ VisiBroker run time DLL (orb_br.dll). The CORBA objects are created in the C++ ORB in the same way as they would be for a pure C++ client and a proxy for the object is maintained on the Delphi side. When a method is invoked on the proxy from a Delphi executable the proxy in turn invokes the same method on the C++ object.


Deployment

One of the mysteries surrounding Delphi/VisiBroker deployment is who is responsible for providing what? VisiBroker states that the components necessary to deploy a VisiBroker application are a subset of their full development kit. The software associated with a deployment license is already a part of the development kit. That’s fine if you are purchasing VisiBroker separately as a product, but what if you have purchased Delphi 5 Enterprise which comes with all the VisiBroker stuff you need to create and deploy an application? In this case you must still purchase a VisiBroker license, but not the development kit. They do not provide much information in their documentation on Visibroker redistribution, partly because there is no general answer. Deployment questions depend on the application and what you need to deploy. So even though you are paying for the VisiBroker license you will be getting everything else you need from Delphi.

Your deployment needs to include whatever is required to run your application. For a client, this usually involves the application executables plus the orb library (orb_br.dll plus orbpas50.dll and cp3245mt.dll – See table below). For a server, it includes the server applications, orb library, and optionally an osagent, OAD, and IREP servers. Osagent, OAD and IREP do not necessarily need to be running on the server, but can be running anywhere on the network where they are visible to the application. If an Object Activation Daemon (OAD) is installed then the implementation repository should be initialized using the oadutil tool. Oadutil and irep require a java vm also (this will already exist on a machine with Delphi 5). Details of OAD are not covered in this document.

VisiBroker can be installed from the Delphi CD by doing a custom install or the necessary files can be included with your deployment (see Environment below for registry settings). The default location for these files on your development machine is C:\Program Files\Borland\vbroker. For development and testing purposes a VisiBroker license is not needed. For your "real world" applications you will need to acquire a VisiBroker deployment license from Inprise. VisiBroker is licensed using a server-based licensing scheme so developing VisiBroker for Delphi applications that integrate with existing applications for which you already have a license may not require additional licenses. Consult your VisiBroker license for complete details. Also note that if you have a multi-tier MIDAS application you will also need to purchase MIDAS licenses for each MIDAS server you deploy [more info].


Deployment summary

File Name

Client

Server

Default location (Delphi 5 installation)

Comments

orbpas50.dll

X

X

C:\Program Files\Borland\Delphi5\Bin

Delphi 5 CORBA layer.

orbpas33.dll

X

X

C:\Program Files\Borland\Delphi5\Bin

This file is not required for all deployments. It comes with the Visibroker 3.3 for Delphi update. Provides additional functionality and works in conjunction with existing DLLs.

cp3245mt.dll

X

X

C:\Program Files\Borland\Delphi5\Bin

C++ Builder Runtime Library.

orb_br.dll

X

X

C:\Program Files\Borland\vbroker\Bin.

VisiBroker runtime Library.

OSAGENT

 

X

C:\Program Files\Borland\vbroker\Bin

One copy needs to be running per network.

IREP

 

X

C:\Program Files\Borland\vbroker\Bin

One per network – optional.

OAD

 

X

C:\Program Files\Borland\vbroker\Bin

One per network – optional.

 

Environment

Here is environment information that should be used in your deployment. This is what the installer does to the environment and to the Windows Registry during installation of VisiBroker for Delphi.

The following environment variable is modified (if the user approves):

PATH=<vbroker installation root>bin;%path%

Windows Registry Settings

HKEY_LOCAL_MACHINE\SOFTWARE\Visigenic Software IncVisiBroker3.0

OSAGENT_PORT=14000 (default)

Pathname=<vbroker installation root>

vbc="" (used during uninstall)

vbj="" (used during uninstall)

VBROKER_ADM=<vbroker installation root>adm

VisiBroker Developer for Java 3.0 key=

NT Services - OSAgent

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\osagent

DisplayName "VisiBroker Smart Agent"

ImagePath "<vbroker installation root>binosagent.exe"

ObjectName "Domain Nameusername"

NT Services - OAD

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\oad

Display Name "VisiBroker Activation Daemon"

ImagePath "<vbroker installation root>binoad.exe"

ObjectName "Domain Nameusername"

The NT Service installation is done using dlls( register.dll ) packaged with the installer.

The Services are installed with SERVICE_ALL_ACCESS, SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, SERVICE_DEMAND_START and SERVICE_ERROR_CRITICAL flags to CreateService.

The services run under LocalSystem account.

Troubleshooting

Error "NO_IMPLEMENT"

This means the client app cannot find the server and could be caused by a multitued of reasons.

Run OSFIND.EXE. If you don’t see your server listed you are not set up correctly.

Other options:

* Is the DOS path correctly

* Are all DLLs present on correct machines (see table)?

Last Modified: 19-APR-00