This chapter describes how to perform some typical server maintenance tasks. It has sections on the following:
You can use the SilverStream Management Console to remotely administer servers. You can administer as many servers as you want from one SMC console. If you are running a server in a cluster, you can choose additional server clusters to administer. For more information about server clusters, see Server clustering.
Handling mail received from clients is an important aspect of Web application development. SilverStream developers might write business objects that trigger when mail is received on the server. To implement this type of object the SilverStream Server must be configured to poll for e-mail in one or more mailboxes from one or more POP3 servers.
The Mail option on the SMC allows you to set up mailboxes for this purpose. For example, if a developer needs a business object to automate the maintenance of a mailing list in the database, you would first create a mail account for mailing list maintenance. Then the developer could write a business object that looks at e-mail received at that mailbox for subscribe and unsubscribe requests.
Once enabled, the SilverStream Server acts as a POP3 client.
This section describes how to install or delete SilverStream user licenses.
SilverStream uses a license key to administer access to the server. License management is integrated with session management. Each user connection requires a license. The license is held for the duration of the connection.
You receive an initial encrypted license key when you buy your product. Each product you purchase comes with a certain type of license. You use the Installation program to add this license key to your server. This information is stored in the database.
You may only need the initial user-based license key during your application development cycle. However, when it comes time to deploy your application and go live, you will probably want to call SilverStream and purchase CPU-based licenses for your application server.
If you have a user-based license, and your application is put into production, when the number of simultaneous users increase, you may see a message like this:
"Maximum server sessions exceeded"
You should add new licenses through the SilverStream Installation program.
When you have multiple licenses installed, SilverStream will use the least restrictive license it finds. For example, if you have installed both a single-user license and a CPU-based license, SilverStream uses the CPU-based license.
The License Information screen appears.
SilverStream uses the license number and other information you enter to generate an encrypted license key.
SilverStream generates an encrypted license key.
To access or delete a license:
The license form displays information about your license.
SilverStream supports an environment variable called AGCLASSPATH, which allows developers to extend Java classes. You can use this AGCLASSPATH, for example, when you want to include third-party elements such as database drivers with your application. Use this variable instead of the +cp
Java class path option described in
Starting the SilverStream Server. SilverStream overrides the CLASSPATH variable.
NOTE When deploying business objects using created Java classes, SilverStream developers should create JAR files using the SilverStream Designer, rather than by setting AGCLASSPATH. For more information, see the Programmer's Guide.
In UNIX, set the environment variable AGCLASSPATH following the appropriate procedure for the shell you are using. For NT, use the following procedure.
The following screen appears.
The screen above shows AGCLASSPATH
with a value of c:\myclasses
.
You can use the SMC to maintain the Enterprise JavaBeans (EJBs) that have been deployed on a server.
For more information about EJBs, see the part on developing EJBs in the Programmer's Guide.
The panel lists the EJB JARs that have been deployed in the selected database. It also lists the beans in the JARs.
You can use the SMC to set some administrative properties used by the Fulcrum SearchServer full text search engine.
For more information about Fulcrum SearchServer and how to enable full text search in SilverStream applications, see the full text search chapter in the online Tools Guide.
To set Fulcrum full text properties:
Specifies how often Fulcrum SearchServer checks and performs incremental indexing for rows whose full-text-search columns have been modified. NOTE Indexing is forced before a query against a modified table is processed. | |
Maximum number of hits Fulcrum will return for a full text search query. The default is 1000. Set this value to 0 if you don't want any limit to the number of hits returned. | |
If this property is selected, SilverStream will not reindex tables marked for full text search at server startup time. For more information, see Indexing full-text-search tables below. |
Indexing full-text-search tables
If the Enable partial indexing at startup property is not selected, at startup time the SilverStream Server deletes all previous full-text indexing from all tables that have full index search enabled, then reindexes all the tables from scratch. After the initial indexing the tables are marked for incremental indexing only when updates are made to them within SilverStream.
Full reindexing of tables consumes resources unnecessarily if the tables are never updated outside of SilverStream.
You can select the Enable partial indexing at startup property (which is selected by default) to turn off full reindexing when the server starts. This means that at server startup, previous indexes will be maintained, tables will be marked for incremental indexing, and incremental indexing for SilverStream-modified tables will continue.
If Enable partial indexing at startup is not selected, full text search tables will be indexed from scratch each time the server starts.
NOTE If you set this property but still have some tables that are updated outside of SilverStream, you can specify full indexing for these tables: Open the SilverStream Business Object Designer and create a business object that will fire when the server is started. Add the following line of code for each table that you want to be reindexed:
com.ssw.srv.agents.AgFullText.index("db", "table");
The SMC provides several options that allow you to easily monitor server activity. These options are described in the following sections:
You can display real-time charts of various server statistics.
To display a chart of server activity:
An empty chart displays.
The Add Plot dialog displays, allowing you to choose which statistics you want to chart. The statistics are divided into categories.
The statistic is added to the table below the chart. The current value of the statistic is shown, as is the color of the plot line that will be generated.
What happens
SilverStream plots all the statistics you have specified and displays the exact values in the table below the chart. By default the values are updated every five seconds.
You can change the scale of the Y-axis by specifying a new value in the Scale field (the default is 100). You can also change how often SilverStream updates the values by changing the value in the Refresh interval field (the default is every five seconds).
It may be that you are plotting different statistics with very different scales but want them to appear clearly in the chart. To do this, you can change the multiplier for particular plots to equalize the values and make the chart easier to read.
The Change Plot Detail dialog displays.
Once you have charted a set of statistics that you are interested in, you can save the specification of the statistics set in a file so that you can easily view the set of statistics later.
NOTE The file stores the list of statistics that are plotted. It does not store the statistics' values.
The Save dialog displays.
The specifications for the chart are saved in a file. You can view the statistics set later by clicking Load, as described next.
To view a statistics set you saved previously:
The Open dialog displays.
The chart is updated to show the statistics set that had been saved in the file.
If you have enabled server logging and are using the built-in SilverStream logging class to log to the database, you can display the log(s) in realtime in the SMC. (If you are logging to a file or using a custom class to do the logging, you can't display the log in the SMC.)
For more information about server logging, see Using server logging.
The log displays.
What you can do
You can display in the SMC tabular views of server statistics related to individual sessions and threads, as well as a summary of server activity.
To access server statistics in a view:
Statistics are updated dynamically.
What you can do
About the statistics
The following sections describe the statistics that are displayed.
This tab displays statistics for each current client session.
Viewing statistics in a browser
You can also display these statistics in a browser: Point your browser at http://server/SilverStream/Sessions.
This tab displays statistics for each server thread.
Following is a description of each of the fields.
Non-client threads are used for various internal tasks, such as cleaning up server data structures, indexing full-text tables, and so on. Client threads handle incoming requests. There should be at least as many client threads as there are MAXCLIENTCONNS listed in the SMC Connections panel (see Client connection parameters). ResultBuffer threads are prefetch buffer threads as defined in the SMC (see Setting performance parameters). They are dynamically added as needed, but should not exceed the number defined in the SMC. | |
The start date for the thread. In many cases this date is the same as when the server was started. However for dynamically allocated threads (such as prefetch buffers) this value will be different. | |
The elapsed time (in seconds) since the thread has been actively working, as opposed to waiting. This value reflects how busy the server is in general. | |
An internal session ID for this thread. Refer to the Sessions tab to determine user/host information. |
This tab provides access to different types of category summaries. The following describes the items for each tab selection.
The number of HTTP message requests that the server has received since it started. | |
The number of bytes returned by the server since it started. |
The current number of threads not associated with a client connection and available for immediate use. | |
The number of threads associated with a client connection, but not currently handling a user request. | |
The total number of client threads allocated. This number should be equal to the Maximum number of client connections in the SMC Connections panel (see Client connection parameters). |
Viewing statistics in a browser
You can also display most of these summary statistics in a browser: Point your browser at http://server:port/SilverStream/Statistics. The page updates itself automatically every five seconds.
SilverStream provides a mechanism that allows you to redirect requests for selected pages served by your Web server to a SilverStream Server. This mechanism is implemented by SilverJunction, an NSAPI/ISAPI module that can be installed on Microsoft Internet Information Server or Netscape Enterprise/Fast Track Web servers.
For information on installing SilverJunction, see the Installation Guide.
Through the use of HTTP redirect mechanisms, SilverJunction allows for one-time redirects from standard Web servers. SilverStream uses two HTTP redirect calls: 302 for 1.0 implementations and 307 for 1.1 implementations. These implementations are executed at the browser level and are hidden from the user.
The example in this section describes a typical implementation of the SilverJunction plug-in. ABCDE Company has an IIS server that is accessible by clients at the host http://www.ABCDE.com. The company catalog resides at http://www.ABCDE.com/catalog. The catalog has been redesigned and improved using SilverStream, and now runs on a SilverStream Server at the following URL:
http://s2.ABCDE.com/productdb/Pages.
ABCDE's Web master does not want to break any existing links that may point to the old location of the catalog so the Web master installs a SilverJunction filter (plug-in) for IIS on the original Web server. Then the Web master writes a configuration file specifying that all requests that come to the Web server at www.ABCDE.com and whose relative URL portion looks like "/catalog/*" should be redirected to http://s2.ABCDE.com/productdb/Pages/*.
Given this setup, an HTTP 1.1 browser pointed to:
http://www.ABCDE.com/catalog/main.html
receives a temporary redirect (HTTP code 307) to:
http://s2.ABCDE.com/productdb/Pages/main.html
If the SilverStream Server is running as part of a cluster, the Dispatcher will redirect the request to an appropriate SilverStream Server.
Once the user has been redirected to the SilverStream Server, subsequent calls will go directly to the SilverStream Server and not to the original Web server. The SilverJunction mechanism may mask the URL on the first redirect but since the user has been fully redirected to the SilverStream Server, the URL may not be masked on subsequent requests.
The following shows how SilverJunction works using a standalone SilverStream Server. The initial client request directed at the IIS server is redirected back to the client to be resent directly to the SilverStream Server.
The following shows how SilverJunction works in a clustered server environment. In this case the client request is redirected twice. The first redirect goes to the Dispatcher, which then redirects the request to an appropriate server. For more information, see Administering a Cluster.
To configure SilverStream as a plug-in:
SilverJunction.jdl
, located in SilverStream/Resources
. By default, the configuration file SilverJunction.jdl
is found in the Silverstream/resources
directory. The IIS version of SilverJunction will always look for it in this location.
For an NSAPI (NetScape) version, the location of the configuration file is determined by initialization parameters specified in the obj.conf
file. This is done by inserting the following lines:
Init fn=init_redirect
conf_file="SilverStream/Resources/SilverJunction.jdl"
For more information, see the Netscape Server documentation.
The following is an example of a setup in SilverJunction.jdl
.
SILVER_JUNCTION
TARGET_SERVER
/Host 'machine.domain.com'
/Port 8002
endobj
MAP
/From '/S2/'
/To '/'
endobj
MAP
/From '/demo1'
/To '/silverstream1/db2/user3'
endobj
endobj
You must enter a TARGET_SERVER
. Both /Host
and /Port
properties must be defined.
/Host
property indicates the name of the machine to which redirects are sent/Port
property indicates the port on which a dispatcher (in a cluster environment) or the SilverStream Server is running. Specify at least one MAP. When specifying a MAP, both /From
and /To
properties must be defined:
/From
property indicates the prefix of the URLs that are redirected. /To
property indicates the prefix that replaces that prefix when a request is forwarded to the redirect target.
Example
Given the settings in the preceding file a request for /demo1/main.htm is redirected to:
http://machine.domain.com:8002/silverstream1/db2/user3/main.htm