// check state of this instance
sanityCheck();
if (obsMgr == null) {
try {
ObservationManagerFactory factory =
rep.getObservationManagerFactory(wspConfig.getName());
obsMgr = factory.createObservationManager(session, session.getItemManager());
} catch (NoSuchWorkspaceException nswe) {
// should never get here
String msg = "internal error: failed to instantiate observation manager";
log.debug(msg);
throw new RepositoryException(msg, nswe);