Author: thomas.heute(a)jboss.com
Date: 2008-11-26 13:10:13 -0500 (Wed, 26 Nov 2008)
New Revision: 12308
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceInvoker.java
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
Log:
JBPORTAL-2246: Portlet invoker exception during portlet window rendering
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2008-11-26
01:17:46 UTC (rev 12307)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2008-11-26
18:10:13 UTC (rev 12308)
@@ -85,15 +85,6 @@
/** . */
protected JBossAuthorizationDomainRegistry authorizationDomainRegistry;
- /** . */
- protected PortletInvoker handler = new PortletInvokerInterceptor()
- {
- public PortletInvocationResponse invoke(PortletInvocation invocation) throws
IllegalArgumentException, PortletInvokerException
- {
- return portletInvoker.invoke(invocation);
- }
- };
-
/** Used to bypass security checks for testing. */
protected boolean performSecurityChecks;
@@ -414,7 +405,6 @@
{
try
{
- stack.getInterceptor(stack.getLength() - 1).setNext(handler);
return stack.getInterceptor(0).invoke(invocation);
}
catch (Exception e)
@@ -432,10 +422,6 @@
throw new PortletInvokerException(e);
}
}
- finally
- {
- stack.getInterceptor(stack.getLength() - 1).setNext(null);
- }
}
return portletInvoker.invoke(invocation);
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceInvoker.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceInvoker.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceInvoker.java 2008-11-26
18:10:13 UTC (rev 12308)
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.core.model.instance;
+
+import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class InstanceInvoker extends PortletInvokerInterceptor
+{
+ /** . */
+ protected PortletInvoker portletInvoker;
+
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws
IllegalArgumentException, PortletInvokerException
+ {
+ return portletInvoker.invoke(invocation);
+ }
+
+ public PortletInvoker getPortletInvoker()
+ {
+ return portletInvoker;
+ }
+
+ public void setPortletInvoker(PortletInvoker portletInvoker)
+ {
+ this.portletInvoker = portletInvoker;
+ }
+
+}
+
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-11-26
01:17:46 UTC (rev 12307)
+++
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-11-26
18:10:13 UTC (rev 12308)
@@ -147,6 +147,9 @@
</depends-list>
</mbean>
+
+
+
<!-- Command stack -->
<mbean
code="org.jboss.portal.core.aspects.controller.ControlInterceptor"
name="portal:service=Interceptor,type=Command,name=Control"
xmbean-dd=""
@@ -266,6 +269,14 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
</mbean>
+ <mbean code="org.jboss.portal.core.model.instance.InstanceInvoker"
+ name="portal:service=Interceptor,type=Portlet,name=InstanceInvoker"
xmbean-dd=""
+
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <depends optional-attribute-name="PortletInvoker"
proxy-type="attribute">
+ portal:service=PortletInvoker,type=Federating
+ </depends>
+ <xmbean/>
+ </mbean>
<mbean
code="org.jboss.portal.portlet.impl.invocation.JBossPortletInterceptorStackFactory"
name="portal:service=InterceptorStackFactory,type=Instance"
xmbean-dd=""
@@ -275,6 +286,7 @@
<depends-list-element>portal:service=Interceptor,type=Portlet,name=ConsumerCache</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=InstanceSecurity</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=PortalSessionSynchronization</depends-list-element>
+
<depends-list-element>portal:service=Interceptor,type=Portlet,name=InstanceInvoker</depends-list-element>
</depends-list>
</mbean>
@@ -1034,7 +1046,6 @@
<depends optional-attribute-name="CoordinationConfigurator"
proxy-type="attribute">
portal:service=CoordinationService
</depends>
-
</mbean>
<!-- The controller factory -->
@@ -1181,5 +1192,5 @@
<depends optional-attribute-name="JBossAppEntityResolver"
proxy-type="attribute">portal:service=EntityResolver
</depends>
</mbean>
-
+
</server>