hhuijser/liferay-portal — pull request #801 by shinnlok (2012-08-13 14:54:50+00:00)
Title: LPS-29103

Based on:
d7e700fd21af9cf9725b97a587328e7e6c456c96 http://issues.liferay.com/browse/LPS-26425
36b26040f8e272088ddeb682db798b86c6055556 http://issues.liferay.com/browse/LPS-26651
958b413c3fc0d7868077d2ffd69874984ee0c05e http://issues.liferay.com/browse/LPS-26789
727bf4600c869bdefc2510fa6e5dea0b1806eaed http://issues.liferay.com/browse/LPS-27136
e0150116a6e1c03482cd71ba2c645b295067627b http://issues.liferay.com/browse/LPS-26321

I don't think plugin context listeners should be loading before custom servlet context listeners. It causes spring mvc portlets (sample-spring-portlet) to break because of it's beans hasn't been initialized yet, same thing that happened back in this ticket:

http://issues.liferay.com/browse/LEP-5062

Listeners NEED to be loaded in this order:

..

..

Unless my conclusion is incorrect and for whatever reason plugin context listeners still need to be loaded first in some cases, the second commit is not necessary. All it does is add a check to see if a portlet is a spring mvc portlet or (to handle other cases where needed) has added property plugin-context-listener-first set to false and load the custom listeners first.

I think merging in the first commit is all we need.