The Profile Marker Manager specifies a default duplication mode that is used for the markers it creates when the scenario (or servlet bean) used to add the marker doesn’t provide an alternate mode. The Profile Marker Manager accepts three values for the defaultDuplicationMode property:

When a Profile Marker Manager is prompted to create a marker that is identical to one that already exists in a given profile, the Profile Marker Manager can discard the new marker (NO_DUPLICATES), replace the original with the duplicate (REPLACE_DUPLICATES),or accept the new marker in addition to the original (ALLOW_DUPLICATES). Fewer markers cause quicker response in queries for a particular marker in a profile, but may slow the marker creation and removal processes.

You can change your duplication mode at any time. If the Profile Marker Manager previously permitted duplicate markers (ALLOW_DUPLICATES), you can adjust it to replace all old markers with a new duplicate (REPLACE_DUPLICATES).

When you specify a preference for unique markers (NO_DUPLICATES or REPLACE_DUPLICATES), the Profile Marker Manager relies on a compare component to determine whether a new marker is a duplicate of any existing ones. By default, the defaultMarkerDuplicateComparator property is set to /atg/markers/CompareByDefaultProperties, which identifies two markers as identical when they have the same values in their key, value, and data properties respectively. The /atg/markers/userprofiling/CompareByKeyAndValue component judges duplication based on the values in the key and value properties.

Defining Uniqueness

You can create your own components that judge uniqueness based on the marker properties you identify or the business logic you define. One approach is to provide multiple compare components, each of which is tailored to the uniqueness criteria required for a particular type of profile marker (as identified by marker key).

To create a compare component that determines equality based on marker property values:

To create a compare component that determines equality based on the business logic you define: