this.targetChannel.setRuntimeData(this.runtimeData);
((IResetableChannel) this.targetChannel).prepareForRefresh();
}
ChannelRuntimeData crd = (ChannelRuntimeData) this.runtimeData.clone();
crd.clear(); // Remove parameters
if (this.targetChannel instanceof IPrivileged) {
((IPrivileged) this.targetChannel).setPortalControlStructures(this.portcs);
}
this.targetChannel.setRuntimeData(crd);
final ChannelManager cm = this.portcs.getChannelManager();
cm.setChannelInstance(channelSubscribeId, this.targetChannel);
this.renderChannel(this.targetChannel, contentHandler, printWriter);
return;
}
catch (Exception e) {
// if any of the above didn't work, fall back to the error channel
resetCError(ErrorCode.SET_RUNTIME_DATA_EXCEPTION, e, channelSubscribeId, this.targetChannel, "Channel failed a refresh attempt.");
}
}
else if (chFate.equals("restart")) {
final ChannelManager cm = this.portcs.getChannelManager();
try {
//Clean things up for the channel
if (this.targetChannel instanceof IResetableChannel) {
if (this.targetChannel instanceof IPrivileged) {
((IPrivileged) this.targetChannel).setPortalControlStructures(this.portcs);
}
this.targetChannel.setRuntimeData(this.runtimeData);
((IResetableChannel) this.targetChannel).prepareForReset();
}
final ChannelRuntimeData crd = (ChannelRuntimeData) this.runtimeData.clone();
crd.clear();
if ((this.targetChannel = cm.instantiateChannel(this.portcs.getHttpServletRequest(), this.portcs.getHttpServletResponse(), channelSubscribeId)) == null) {
resetCError(ErrorCode.GENERAL_ERROR, null, channelSubscribeId, null, "Channel failed to reinstantiate!");
}
else {