projectobject for each application running on the server.
projectobject when an application starts and destroys the
projectobject when the application or server stops. The typical
projectobject lifetime is days or weeks. Each client accessing the same application shares the same
projectobject. Use the
projectobject to maintain global data for an entire application. Many clients can access an application simultaneously, and the
projectobject lets these clients share information. The runtime engine creates a set of
projectobjects for each distinct Netscape HTTPD process running on the server. Because several server HTTPD processes may be running on different port numbers, the runtime engine creates a set of
projectobjects for each process. You can lock the
projectobject to ensure that different clients do not change its properties simultaneously. When one client locks the
projectobject, other clients must wait before they can lock it. See
Lockfor more information about locking the
projectobject has no predefined properties. You create custom properties to contain project-specific data that is required by an application. You can create a property for the
projectobject by assigning it a name and a value. For example, you can create a
projectobject property to keep track of the next available Customer ID. Any client that accesses the application without a Customer ID is sequentially assigned one, and the value of the ID is incremented for each initial access.
lastIDproperty and assigns a value to it by incrementing an existing value.
project.lastID = 1 + parseInt(project.lastID, 10)Example 2. This example increments the value of the
lastIDproperty and uses it to assign a value to the
project.lock()In the previous example, notice that the
project.lastID = 1 + parseInt(project.lastID, 10);
client.customerID = project.lastID;
projectobject is locked while the
customerIDproperty is assigned, so no other client can attempt to change the
lastIDproperty at the same time.
Last Updated: 11/13/98 10:23:37