*
* <p>FIXME: If any restartables throw exceptions, the old
* factory will not be destroyed, and we may leak runtimes...
*/
public void restart() {
final Factory oldFactory = assertNotNull(factory);
factory = null;
init(assertNotNull(originalConfig));
for (Restartable r : restartables) {
try {
r.restart();
} catch (ServletException e) {
logger.error("{}: error restarting {}",
new Object[] { this, r },
e);
}
}
oldFactory.unreference(this); // find unref destroys factory
}