public static WSRPProducerPersistence getPersistence() {
    if (_persistence == null) {
      _persistence =
          (WSRPProducerPersistence)
              PortletBeanLocatorUtil.locate(
                  com.liferay.wsrp.service.ClpSerializer.getServletContextName(),
                  WSRPProducerPersistence.class.getName());

      ReferenceRegistry.registerReference(WSRPProducerUtil.class, "_persistence");
    }

    return _persistence;
  }
  public static WSRPProducerLocalService getService() {
    if (_service == null) {
      InvokableLocalService invokableLocalService =
          (InvokableLocalService)
              PortletBeanLocatorUtil.locate(
                  ClpSerializer.getServletContextName(), WSRPProducerLocalService.class.getName());

      if (invokableLocalService instanceof WSRPProducerLocalService) {
        _service = (WSRPProducerLocalService) invokableLocalService;
      } else {
        _service = new WSRPProducerLocalServiceClp(invokableLocalService);
      }

      ReferenceRegistry.registerReference(WSRPProducerLocalServiceUtil.class, "_service");
    }

    return _service;
  }