The link-method attribute determines what happens when the composite repository needs to get a property value that belongs to a contributing repository item. For example, suppose a process calls

CompositeItem.getPropertyValue("ldapFirstName");

where ldapFirstName is a property of a contributing repository item in an LDAP repository. The CompositeItem that is being asked for the property needs to look for this contributing item. If it is able to find it, it retrieves the property value and then does one of two things based on the value of the link-method attribute.

If the link-method attribute is set to static, then the contributing item is stored in a member variable of that composite repository item, so that the next time a property is requested from that same item, it just retrieves it from this variable instead of finding it again from the underlying contributing repository. This saves some computational effort and results in faster property retrieval. However, if for any reason, the value of the property or properties used to link to the underlying contributing item have been changed, the data in this member variable will be stale. Note that this can only occur if a linking property the underlying data store is altered. For example, if you link to a contributing item descriptor using a login property, static linking could result in stale data only if the login property is changed in one in the underlying repositories.

If the link-method attribute is set to dynamic, then the composite repository queries the underlying repository for the contributing item every time a property is requested from it. This might result in slower performance, but it also means that data would never be out of sync at the repository level.

Dynamic link mode might seem like the most technically correct implementation, since the data model is guaranteed to reflect the most up-to-date information. However, since it requires a query each time information is needed from a composite item, it can impair performance. Remember also that in most cases, the information that links items together changes only rarely. Static linking is more often than not sufficient to provide correct data model linking.

 
loading table of contents...