*
* @see org.xmlBlaster.contrib.replication.I_ReplSlave#requestInitialData()
*/
public void requestInitialData(String dbWatcherSessionId, boolean onlyRegister) throws Exception {
log.info(this.name + " sends now an initial update request to the Master '" + dbWatcherSessionId + "'");
I_XmlBlasterAccess conn = this.global.getXmlBlasterAccess();
// no oid for this ptp message
PublishKey pubKey = new PublishKey(this.global, REQUEST_INITIAL_DATA_TOPIC);
Destination destination = new Destination(new SessionName(this.global, dbWatcherSessionId));
destination.forceQueuing(true);
PublishQos pubQos = new PublishQos(this.global, destination);
pubQos.addClientProperty(ReplicationConstants.SLAVE_NAME, this.slaveSessionId);
pubQos.addClientProperty(ReplicationConstants.REPL_VERSION, this.ownVersion);
if (this.initialFilesLocation != null)
pubQos.addClientProperty(ReplicationConstants.INITIAL_FILES_LOCATION, this.initialFilesLocation);
pubQos.setPersistent(true);
if (onlyRegister)
pubQos.addClientProperty(ReplicationConstants.INITIAL_UPDATE_ONLY_REGISTER, onlyRegister);
MsgUnit msg = new MsgUnit(pubKey, ReplicationConstants.REPL_REQUEST_UPDATE.getBytes(), pubQos);
conn.publish(msg);
}