docs: public void subscribeResourceFor(
          CmsRequestContext context,
          String poolName,
          CmsPrincipal principal,
          CmsResource resource)
      throws CmsException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              m_driverManager.subscribeResourceFor(dbc, poolName, principal, resource);
          } catch (Exception e) {
              if (principal instanceof CmsUser) {
                  dbc.report(
                      null,
                      Messages.get().container(
                          Messages.ERR_SUBSCRIBE_RESOURCE_FOR_USER_2,
                          context.getSitePath(resource),
                          principal.getName()),
                      e);
              } else {
                  dbc.report(
                      null,
                      Messages.get().container(
                          Messages.ERR_SUBSCRIBE_RESOURCE_FOR_GROUP_2,
                          context.getSitePath(resource),
                          principal.getName()),
                      e);
              }
          } finally {
              dbc.clear();
          }
      }