@Before public void setUp() { PropsUtilAdvice.setProps(PropsKeys.INTRABAND_IMPL, ExecutorIntraband.class.getName()); PropsUtilAdvice.setProps(PropsKeys.INTRABAND_TIMEOUT_DEFAULT, "10000"); PropsUtilAdvice.setProps(PropsKeys.INTRABAND_WELDER_IMPL, SocketWelder.class.getName()); SPIRegistryUtil spiRegistryUtil = new SPIRegistryUtil(); spiRegistryUtil.setSPIRegistry( new SPIRegistryImpl() { @Override public void registerSPI(SPI spi) {} @Override public void unregisterSPI(SPI spi) {} }); }
private RegistrationReference _getRegistrationReference(String portletId) { SPI spi = SPIRegistryUtil.getPortletSPI(portletId); if (spi == null) { return null; } try { return spi.getRegistrationReference(); } catch (RemoteException re) { throw new RuntimeException(re); } }
protected SPIAgent getSPIAgentForPortlet(Portlet portlet) throws PortletContainerException { try { SPI spi = SPIRegistryUtil.getPortletSPI(portlet.getRootPortletId()); if (spi == null) { return null; } if (_log.isDebugEnabled()) { _log.debug("Portlet " + portlet + " is registered to SPI " + spi); } return spi.getSPIAgent(); } catch (Exception e) { throw new PortletContainerException(e); } }