> Torsten Dettborn commented on PLUTO-267: > ---------------------------------------- > > I want to bring this issue on top of the mailing- list for discussion. > Christian has tests his implementation on the old implementation, before > the patch from Tuomas has committed(all was fine). From design questions > it is right that all functionality is in the portal, but the question is, > how we can get the classloader from the portlet app. This we need for the > unmarshalling, as Christian has written.
Perhaps, upon portlet initialization, the payload classes of any supported events could be placed in a Map and stored as a servlet context attribute. The keys could be the qualified names of the event payload, and the values could be a Class that was loaded using Thread.getContextClassloader().loadClass during the PortletServlet's init() method. Then, instead of loading the class during the event firing phase, use ServletContext.getContext(String) to retrieve the required ServletContext, look up the map of previously loaded classes, and pass the appropriate one to the Unmarshaller. Just my two cents, -- Ben