In a distributed environment, it is very possible that you will have more than one MTS Server running identical packages. In fact, this is directly
tied into the scalability of MTS. As an n-Tier application grows and there is
more user activity, you may need to partition the middle-tier. In other words,
load balancing can be achieved by adding additional physical servers. Each MTS
Server can be configured with identical packages and identical security. Client
computers can easily be switched from using one computer to another. This is extremely
helpful because you can design the installation of your application to efficiently
correspond to the design of your network.
MTS makes it easy to copy a package from one server to another
through built-in Export and Import tools. Both of these tools center around a
package file (that has an extension of .pak). The package file describes the components
to be Imported as well as any MTS settings associated with the originating package.
One nice feature of the Export and Import wizards is that you can perform either
remotely. In other words, you don’t have to be sitting at the machine with
the source package to create a package file and vice versa.
Exporting an existing MTS package will copy the DLL files for
each component in the package so they can be imported by another MTS server. Exporting
a package is explained as follows:
STEP BY STEP
15.8 Exporting a Package
From the MTS Explorer, double-click the computer that contains the package
you intend to export.
Click on the MTS package you want to export.
From the Action menu, select Export. Like most operations in the Microsoft
Message Console, you can do the same thing through a different means by right-clicking
on the package while it’s selected and then selecting Export. Either way
will take you to the Export Package dialog box shown in Figure 15.15.
Type in or browse to the destination path where you want the package file and
related files to be copied.
With the desired path in the text box, click the Export button. If there are
no errors, the wizard will display a message box indicating the export was successful.
Now if you browse to the path, you will find a PAK file with whatever
title you gave it and all the DLLs for each component in that package. Also, you
will find a directory with the names of clients. For more information on the contents
of the clients’ directory, see Chapter 16, "Developing MTS Applications."
Now the package file can be imported into another server. A synopsis of the steps
necessary to perform an import follows:
STEP BY STEP
15.9 Importing a Package
From the MTS Explorer, double-click the computer for which you want to import
Click on the Packages Installed folder.
Right-click New, then select Package to again display the Package Wizard.
This time, click the button labeled Install prebuilt packages.
Select the package file by clicking the Add button and browsing to the location
of your source PAK file. You can add more than one package at a time (see Figure
The next screen allows you to choose the security context in which your package
will run. For now leave this as Interactive User. More information regarding package
identity will be covered in Chapter 16.
The final screen shows you the path to the component files on the target machine.
Most likely, it will be C:\Program Files\MTS\Packages (see Figure 15.17).
Click Finish. You may now use the MTS Explorer to browse to the package on
the destination server. All components from the package on the source server should
also exist on the destination server.