* @see org.jboss.ha.framework.server.HAServiceImpl#registerDRMListener()
*/
@Override
protected void registerDRMListener() throws Exception
{
DistributedReplicantManager drm = this.getHAPartition().getDistributedReplicantManager();
// Temporary drm listener
RecordingReplicantListener listener = new RecordingReplicantListener();
String key = this.getHAServiceKey();
// record replicant changes, but don't handle them just yet
drm.registerListener(key, listener);
// this ensures that the DRM knows that this node has the singleton deployed
drm.add(key, this.getReplicant());
// Now register the real listener
drm.registerListener(key, this);
// ...and unregister our temporary one
drm.unregisterListener(key, listener);
ReplicantView view = this.viewReference.getAndSet(null);
// Process the recorded replicant change
// Typically this will be the replicant change from drm.add(...)