Serializable dstPayload = srcPayload;
if (srcPayload instanceof SerializablePayload)
{
PortletContainer container = (PortletContainer)invocation.getAttribute(ContainerPortletInvoker.PORTLET_CONTAINER);
String containerId = container.getId();
QName eventName = eventInvocation.getName();
boolean trace = log.isTraceEnabled();
// get the event metadata from the portlet metadata
PortletInfo info = container.getInfo();
EventingInfo eventingInfo = info.getEventing();
Map<QName, ? extends EventInfo> consumedEventInfos = eventingInfo.getConsumedEvents();
EventInfo eventInfo = consumedEventInfos.get(eventName);
Class dstPayloadClass;
if (eventInfo != null)
{
// get the type of the event
ContainerTypeInfo typeInfo = (ContainerTypeInfo)eventInfo.getType();
if (typeInfo != null)
{
// if we managed to get the event type information, try to unmarshall the event from the XML payload
dstPayloadClass = typeInfo.getType();
if (trace)
{
log.trace("Obtained for event " + eventName + " its payload class " + dstPayloadClass.getName() + " declared by the portlet meta data "
+ containerId);
}
// get the portlet application class loader so we can access the war classes
PortletApplication application = container.getPortletApplication();
PortletApplicationContext applicationContext = application.getContext();
ClassLoader loader = applicationContext.getClassLoader();
if (srcPayload instanceof SerializableSimplePayload)
{