public void run() {
try {
final IHeartbeatRepository repository = (IHeartbeatRepository) Class
.forName(heartbeatRepositoryClassName)
.getConstructor(String.class).newInstance(uid);
final IHeartbeat heartbeat = new Heartbeat(System
.currentTimeMillis(), uid, jmxUrl0);
while (true) {
repository.update(heartbeat);
Thread.sleep(IHeartbeat.INTERVAL);
}