 |
COM and CORBA® Side by Side |
Before you attempt to run the examples, make sure that you have
properly configured your environment.
Click here for information related to the
configuration that I used on my computers.
Click here for an
overview of the Chapter 10 examples.
Warning: This example is fairly complex.
Before attempting to build it, I recommend that you first read all of Chapter
10.
Building the Examples
To build the examples, run the _make.bat file in each of the
following directories. Note that the order in which the examples are built is
important.
 | book\ch10\servers\com_customer_interface |
 | book\ch10\servers\com_customer_server |
 | book\ch10\servers\com_customer_proxy |
 | book\ch10\servers\com_customer_wrapper |
 | book\ch10\servers\com_to_corba_bridge |
 | book\ch10\servers\corba_customer_server |
 | book\ch10\servers\corba_customer_proxy |
 | book\ch10\servers\corba_to_com_bridge |
 | book\ch10\clients\com_vb client |
 | book\ch10\clients\corba_java_applet |
Throughout this page, we will refer to three different machines on which
various applications will be run. They are:
 | Remote Server - This is the machine where the actual COM and CORBA server
will run. |
 | Web Server - This machine will serve up web pages. |
 | Client - This machine will access the web server (and remote server in the
case of the VB COM client). |
On the remote server, do the following:
 | Install proxy-stub DLL (customerps.dll) on remote server using
regsvr32.exe. |
On the web server and client machine where VB client will run, do the following:
 | Install proxy-stub DLL (customerps.dll) on web server using regsvr32.exe. |
 | Install com_customer_wrapper DLL on web server using regsvr32.exe. This
wrapper DLL will be used by the ASP application on the web server. |
 | Install the ProgID data onto the web server from the following file:
 | book\ch10\servers\midl\progid.reg
|
|
Configuring MTS
On the remote server, start the MTS Explorer (MMC) and do the following:
 | Create an MTS package named "Ch10" (the actual name can be of your own
choosing). |
 | Add com_customer_server dll to the Ch10 package. |
On the web server, start the MTS Explorer (MMC) and do the following:
 | Create an MTS package named "Ch10" (the actual name can be of your own
choosing). |
 | Add com_customer_proxy dll to the Ch10 package. |
 | Add com_to_corba_bridge dll to the Ch10 package.
|
Configuring IIS
On the web server, start the Internet Service Manager (MMC) and do the following:
 | Create a virtual directory under IIS. |
 | Add ASP files from the following directory to the virtual directory:
 | book\ch10\clients\com_asp client
|
|
Starting the CORBA Servers
On the remote server, manually start the CORBA server from the following
directory:
 | book\ch10\servers\corba_customer_server |
On the web server, manually start the CORBA servers from the following
directories:
 | book\ch10\servers\corba_customer_proxy |
 | book\ch10\servers\corba_to_com_bridge
|
Running the Examples
Before you attempt to try the Active Server Pages application, first try the
VB application located in the following directory:
 | book\ch10\clients\com_vb client |
Once you have run the test application and know that the COM server is
working correctly, you can run the ASP application by using the appropriate URL
from a web browser. For example:
 | http://scarpia/ch10/customer.asp |
To run the CORBA/Java client application, make sure that the following directory is
accessible from your web server:
 | book\ch10\clients\corba_java_applet |
To run the CORBA/Java applet, type the appropriate URL into your web browser.
For example:
 | http://scarpia/ch10/corba_java_applet/CustomerApplet.html
|
Remarks
 | Note that the Java Plug-in is used to ensure support for Java IDL and Swing.
You will need to ensure that the Java Plug-in is installed on the machine
where you will run the web browser. Click
here for more information on the Java Plug-in.
|
 | To simplify the examples, you will need network access to all of the IORs
generated by the various CORBA servers so that you can cut and paste them
into the client applications.
|
 | Whenever the CORBA servers are restarted, the CustomerApplet.html file
needs to be updated to reflect the newly generated IORs. |
|