byte[] originalState = originalContext.getPortletState();
byte[] newState = portletContext.getPortletState();
if (!Arrays.equals(originalState, newState))
{
StateEvent event = new StateEvent(WSRPUtils.convertToPortalPortletContext(portletContext), StateEvent.Type.PORTLET_MODIFIED_EVENT);
context.onStateEvent(event);
}
}
// update the session information associated with the portlet handle
consumer.getSessionHandler().updateSessionInfoFor(originalContext.getPortletHandle(), handle, invocation);