* try to obtain the PortletApplication from the WebAppController.
*
* If it does not exist a new PortletApplication object is created, init and cached in the controller
*/
private PortletApplication getPortletApplication() throws Exception {
ExoContainer container = ExoContainerContext.getCurrentContainer();
WebAppController controller = (WebAppController) container.getComponentInstanceOfType(WebAppController.class);
PortletApplication application = controller.getApplication(applicationId_);
if (application == null) {
if (appProvider != null) {
// We are only expecting one
application = appProvider.createApplication(getPortletConfig());