1. | Why can I not change the value of a property if it has the KEY qualifier? |
|
2. | How can I create a unique opaque key ” the InstanceID? |
|
Answers
1. | From a philosophical viewpoint, because it is the combination of values of the key properties that defines a particular instance. If the value of a key property changes then you have created a new instance. From a practical viewpoint, the WBEM server will use the values of the keys to store instances in such a way that they can be efficiently retrieved. Changing a key of an instance already created would be very difficult to handle. |
2. | This varies from application to application. The simplest, but often impractical , technique is to have a central authority which issues an incrementing number. It can ensure that the same number is never issued twice. If this is impractical look for a base number which is guaranteed to be globally unique, a MAC address, for example. Then combine this with something which is locally unique, a slot number or user identity, for example. Together these could form a unique key. |