if (!cd.isPortletWindowInitialized()) {
this.initPortletWindow(uid);
}
try {
PortletContainerServices.prepare(uniqueContainerName);
<BUG>PortalControlStructures pcs = channelState.getPortalControlStructures();
HttpServletRequest wrappedRequest = new ServletRequestImpl(pcs.getHttpServletRequest(), sd.getPerson(),
cd.getPortletWindow().getPortletEntity().getPortletDefinition().getInitSecurityRoleRefSet());
setupRequestAttributes(wrappedRequest, uid);
PortletWindowImpl portletWindow = (PortletWindowImpl)cd.getPortletWindow();</BUG>
portletWindow.setChannelRuntimeData(rd);

if (!cd.isPortletWindowInitialized()) {
this.initPortletWindow(uid);
}
try {
PortletContainerServices.prepare(uniqueContainerName);
final PortletWindowImpl portletWindow = (PortletWindowImpl)cd.getPortletWindow();
final PortletEntity portletEntity = portletWindow.getPortletEntity();
final PortletDefinition portletDef = portletEntity.getPortletDefinition();
final HttpServletRequest baseRequest = pcs.getHttpServletRequest();
HttpServletRequest wrappedRequest = new ServletRequestImpl(baseRequest, sd.getPerson(), portletDef.getInitSecurityRoleRefSet());
wrappedRequest = new PortletAttributeRequestWrapper(wrappedRequest);
setupRequestAttributes(wrappedRequest, uid);
portletWindow.setChannelRuntimeData(rd);
