Server-side object | |
Implemented in | LiveWire 1.0 |
project
object for each application running on the server.project
object when an application starts and destroys the project
object when the application or server stops. The typical project
object lifetime is days or weeks.
Each client accessing the same application shares the same project
object. Use the project
object to maintain global data for an entire application. Many clients can access an application simultaneously, and the project
object lets these clients share information.
You can lock the project
object to ensure that different clients do not change its properties simultaneously. When one client locks the project
object, other clients must wait before they can lock it. See Lock
for more information about locking the project
object.
| Obtains the lock. |
| Releases the lock. |
lastID
property 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
lastID
property and uses it to assign a value to the customerID
property.project.lock()In the previous example, notice that the
project.lastID = 1 + parseInt(project.lastID, 10);
client.customerID = project.lastID;
project.unlock();
project
object is locked while the customerID
property is assigned, so no other client can attempt to change the lastID
property at the same time.client
, request
, server
project
object 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 project
object by assigning it a name and a value. For example, you can create a project
object 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.
Method of |
project
|
Implemented in | LiveWire 1.0 |
lock()
Note that this mechanism requires voluntary compliance by asking for the lock in the first place.
Lock
, project.unlock
Method of |
project
|
Implemented in | LiveWire 1.0 |
unlock()
Lock
, project.lock
Last Updated: 10/31/97 12:33:29