コード例 #1
0
  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;
  }
コード例 #2
0
  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;
  }