Lesson 2 . Configuring the Servers
After you activate your Panther application, you need to define and configure its servers. The information you supply to the JetNet manager is added to the binary middleware configuration file, broker.bin that you created in Lesson 1.
In this lesson you learn how to:
- If you shut down the application and exited the JetNet manager since the previous lesson, reactivate it now and connect to the middleware from the server machine. To review those steps in Lesson 1:
Add servers to the application
You need to add two servers to the tutorial application: a standard server and a file access server.
- Double-click on the application Tutorial to expand the heading.
- Select Machine (this should show the name of your server machine).
Configure the standard server
First, add and configure a standard server—a server that advertises and executes JIF-defined services, and performs remote processing of reports. After adding this server, you configure it by setting properties that define its functionality.
More About the JIF
The JIF is a file that stores information about services used by your application-that is, functions performed by a server at the request of a client or another server. The JIF tells clients and servers what parameters and information to use when they process service calls. When you create a service component that has service routines, you must also define in the JIF the service that it provides. You learn more about the JIF in lessons 3 and 6.
- Choose FileNewServer.
The Server Configuration dialog box opens.
- Enter
tutserver
as the name of the server. - Set Minimum Instances to 1. This number determines how many instantiations of this server are created when it is activated. Because you are using Panther's single-user database JDB, in this tutorial this number must be 1; in practice, Minimum Instances is set to a number that is appropriate to the application.
- Choose Standard as the server type (the default selection).
- Choose the Options button.
The Standard Server Details dialog box opens.
Define server properties
In the Standard Server Details dialog, you set properties that are specific to a standard server, such as which JIF-defined services it advertises, whether it runs in a development or production environment, and which database it connects to.
- Under Auto Advertised Services, choose All. This tells the server to advertise all services defined in the JIF. This choice is useful during development because it makes all services available to the application from any given server.
- Under Server Executable, Run Mode, choose Development to indicate the mode for the server executable. (When you activate the server, in Step 20, the File Name field is populated with the full path name of the
proserv
executable in the server machine's proltut
directory.) - Enter the database connection string:
DECLARE c1 CONNECTION WITH DATABASE="vidsales"
When you activate the server, it automatically connects to the specified database vidsales
.
- Choose OK.
The Server Configuration dialog box redisplays.
- Choose OK.
The Application Status window redisplays.
- Expand the Machine heading in the Application Hierarchy list. It should now include the server
tutserver
.
Configure the file access server
Next, you need to add a file access server to the application. This server offers clients shared access to libraries and repositories across the network and provides file transfer services at runtime; it also facilitates remote processing of reports that are transferred back to the client.
- With Machine selected in the Application Hierarchy list, add another server by choosing FileNewServer.
The Server Configuration dialog opens.
- Enter
tutaccess
as the name of the server. - Set Minimum Instances to 1. This number determines how many instantiations of this server are created when it is activated. Because you are using Panther's single-user database JDB, in this tutorial this number must be 1; in practice, Minimum Instances is set to a number that is appropriate to the application.
- Choose File Access as the Server Type.
- Choose OK.
In the Application Status window, both the tutaccess
and tutserver
servers are included in the Application Hierarchy list.
Activate servers
Now start both servers.
- Select the
tutserver
server in the Application Hierarchy list. - Choose EditActivate.
The status window indicates the server's successful activation.
- Select the
tutaccess
server and repeat step 21.
If you have problems activating servers, refer to Appendix B on page B-1.
- Exit the JetNet manager by choosing FileExit.
A dialog box opens, prompting you to confirm that you wish to terminate the session.
If you take a break
If you take a break, remember to shut down the application to free up the system resources.
- Select the Application item from the Application Hierarchy list and choose EditDeactivate from the menu bar (or the Deactivate button from the toolbar).
What did you do?
In this lesson, you performed these tasks:
What did you learn?
You learned:
- The JetNet manager lets you configure and manage the middleware component of a Panther application. With it, you create and edit the binary middleware configuration file (broker.bin), which specifies how to set up an application's clients and servers and configure their interaction—for example, whether multiple workstations can attach to the application, the maximum number of machines, servers, and services that the application can support, how many servers to activate and on which machine, and so on.
- A Panther standard server advertises and executes JIF-defined services, and also performs remote processing of reports during runtime.
Among the properties you specify for a standard server are:
- A Panther file access server offers clients shared access to libraries and repositories across the network. It also provides file transfer services during runtime. File access servers have a single property, which identifies the server by name.