gatein SVN: r4755 - in components/wsrp/trunk: admin-gui and 9 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-20 20:33:02 -0400 (Wed, 20 Oct 2010)
New Revision: 4755
Modified:
components/wsrp/trunk/admin-gui/pom.xml
components/wsrp/trunk/api/pom.xml
components/wsrp/trunk/common/pom.xml
components/wsrp/trunk/consumer/pom.xml
components/wsrp/trunk/hibernate-impl/pom.xml
components/wsrp/trunk/pom.xml
components/wsrp/trunk/producer/pom.xml
components/wsrp/trunk/test/pom.xml
components/wsrp/trunk/wsrp-producer-war/pom.xml
components/wsrp/trunk/wsrp1-ws/pom.xml
components/wsrp/trunk/wsrp2-ws/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- components/wsrp/trunk/admin-gui/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/admin-gui/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-admin-gui</artifactId>
Modified: components/wsrp/trunk/api/pom.xml
===================================================================
--- components/wsrp/trunk/api/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/api/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-integration-api</artifactId>
Modified: components/wsrp/trunk/common/pom.xml
===================================================================
--- components/wsrp/trunk/common/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/common/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-common</artifactId>
Modified: components/wsrp/trunk/consumer/pom.xml
===================================================================
--- components/wsrp/trunk/consumer/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/consumer/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-consumer</artifactId>
Modified: components/wsrp/trunk/hibernate-impl/pom.xml
===================================================================
--- components/wsrp/trunk/hibernate-impl/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/hibernate-impl/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -28,7 +28,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<groupId>org.gatein.wsrp</groupId>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -29,7 +29,7 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
<packaging>pom</packaging>
@@ -40,9 +40,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wsrp/tags/2.0.0-...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/tags/2.0.0-Beta03</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/wsrp/tags/2.0.0-Beta03</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wsrp/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/trunk/</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/wsrp/trunk/</url>
</scm>
<properties>
Modified: components/wsrp/trunk/producer/pom.xml
===================================================================
--- components/wsrp/trunk/producer/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/producer/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-producer-lib</artifactId>
Modified: components/wsrp/trunk/test/pom.xml
===================================================================
--- components/wsrp/trunk/test/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/test/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp1-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp1-ws/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/wsrp1-ws/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp1-ws</artifactId>
Modified: components/wsrp/trunk/wsrp2-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp2-ws/pom.xml 2010-10-21 00:32:42 UTC (rev 4754)
+++ components/wsrp/trunk/wsrp2-ws/pom.xml 2010-10-21 00:33:02 UTC (rev 4755)
@@ -26,7 +26,7 @@
<parent>
<artifactId>wsrp-parent</artifactId>
<groupId>org.gatein.wsrp</groupId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp2-ws</artifactId>
14 years, 2 months
gatein SVN: r4754 - components/wsrp/tags.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-20 20:32:42 -0400 (Wed, 20 Oct 2010)
New Revision: 4754
Added:
components/wsrp/tags/2.0.0-Beta03/
Log:
[maven-scm] copy for tag 2.0.0-Beta03
Copied: components/wsrp/tags/2.0.0-Beta03 (from rev 4753, components/wsrp/trunk)
14 years, 2 months
gatein SVN: r4753 - in components/wsrp/trunk: admin-gui and 9 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-20 20:32:23 -0400 (Wed, 20 Oct 2010)
New Revision: 4753
Modified:
components/wsrp/trunk/admin-gui/pom.xml
components/wsrp/trunk/api/pom.xml
components/wsrp/trunk/common/pom.xml
components/wsrp/trunk/consumer/pom.xml
components/wsrp/trunk/hibernate-impl/pom.xml
components/wsrp/trunk/pom.xml
components/wsrp/trunk/producer/pom.xml
components/wsrp/trunk/test/pom.xml
components/wsrp/trunk/wsrp-producer-war/pom.xml
components/wsrp/trunk/wsrp1-ws/pom.xml
components/wsrp/trunk/wsrp2-ws/pom.xml
Log:
[maven-release-plugin] prepare release 2.0.0-Beta03
Modified: components/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- components/wsrp/trunk/admin-gui/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/admin-gui/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-admin-gui</artifactId>
Modified: components/wsrp/trunk/api/pom.xml
===================================================================
--- components/wsrp/trunk/api/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/api/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-integration-api</artifactId>
Modified: components/wsrp/trunk/common/pom.xml
===================================================================
--- components/wsrp/trunk/common/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/common/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-common</artifactId>
Modified: components/wsrp/trunk/consumer/pom.xml
===================================================================
--- components/wsrp/trunk/consumer/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/consumer/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-consumer</artifactId>
Modified: components/wsrp/trunk/hibernate-impl/pom.xml
===================================================================
--- components/wsrp/trunk/hibernate-impl/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/hibernate-impl/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -28,7 +28,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<groupId>org.gatein.wsrp</groupId>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -29,7 +29,7 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
<packaging>pom</packaging>
@@ -40,9 +40,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wsrp/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/trunk/</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/wsrp/trunk/</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wsrp/tags/2.0.0-...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/tags/2.0.0-Beta03</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/wsrp/tags/2.0.0-Beta03</url>
</scm>
<properties>
Modified: components/wsrp/trunk/producer/pom.xml
===================================================================
--- components/wsrp/trunk/producer/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/producer/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-producer-lib</artifactId>
Modified: components/wsrp/trunk/test/pom.xml
===================================================================
--- components/wsrp/trunk/test/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/test/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp1-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp1-ws/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/wsrp1-ws/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp1-ws</artifactId>
Modified: components/wsrp/trunk/wsrp2-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp2-ws/pom.xml 2010-10-21 00:29:59 UTC (rev 4752)
+++ components/wsrp/trunk/wsrp2-ws/pom.xml 2010-10-21 00:32:23 UTC (rev 4753)
@@ -26,7 +26,7 @@
<parent>
<artifactId>wsrp-parent</artifactId>
<groupId>org.gatein.wsrp</groupId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
+ <version>2.0.0-Beta03</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp2-ws</artifactId>
14 years, 2 months
gatein SVN: r4752 - components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-20 20:29:59 -0400 (Wed, 20 Oct 2010)
New Revision: 4752
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java
Log:
- Oops, tired! We need to only process the string if it's NOT null or empty.
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java 2010-10-21 00:25:28 UTC (rev 4751)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java 2010-10-21 00:29:59 UTC (rev 4752)
@@ -62,7 +62,7 @@
*/
protected String processFragmentString(String renderString)
{
- if (ParameterValidation.isNullOrEmpty(renderString))
+ if (!ParameterValidation.isNullOrEmpty(renderString))
{
return URLTools.replaceURLsBy(renderString, new WSRPUtils.AbsoluteURLReplacementGenerator(ServletAccess.getRequest()));
}
14 years, 2 months
gatein SVN: r4751 - components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-20 20:25:28 -0400 (Wed, 20 Oct 2010)
New Revision: 4751
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java
Log:
- Make it compile on Java 5.
- Minor clean-ups.
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java 2010-10-21 00:14:38 UTC (rev 4750)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java 2010-10-21 00:25:28 UTC (rev 4751)
@@ -24,6 +24,7 @@
package org.gatein.wsrp.producer.handlers.processors;
import org.gatein.common.net.URLTools;
+import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.invocation.response.ContentResponse;
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
@@ -39,7 +40,6 @@
*/
abstract class MimeResponseProcessor<LocalMimeResponse extends MimeResponse, Response> extends RequestProcessor<Response>
{
-// private String namespace;
private static final String EMPTY = "";
protected MimeResponseProcessor(ProducerHelper producer)
@@ -50,8 +50,6 @@
@Override
PortletInvocation initInvocation(WSRPPortletInvocationContext context)
{
-// namespace = getRuntimeContext().getNamespacePrefix();
-
return internalInitInvocation(context);
}
@@ -64,8 +62,7 @@
*/
protected String processFragmentString(String renderString)
{
-// String result = renderString.replaceAll(namespace, WSRPRewritingConstants.WSRP_REWRITE);
- if (renderString != null && !renderString.isEmpty())
+ if (ParameterValidation.isNullOrEmpty(renderString))
{
return URLTools.replaceURLsBy(renderString, new WSRPUtils.AbsoluteURLReplacementGenerator(ServletAccess.getRequest()));
}
14 years, 2 months
gatein SVN: r4750 - in components/wsrp/trunk: consumer/src/main/java/org/gatein/wsrp/consumer/handlers and 3 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-20 20:14:38 -0400 (Wed, 20 Oct 2010)
New Revision: 4750
Added:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializablePayload.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializableSimplePayload.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/WSRPEventPayloadInterceptor.java
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/PayloadUtils.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/EventRequestProcessor.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
components/wsrp/trunk/wsrp-producer-war/src/test/producer-sar/portlet-container.war/WEB-INF/jboss-beans.xml
Log:
- GTNWSRP-67: Re-considered approach of event payload handling: encapsulate them in SerializablePayload classes and deal with them in a specific PortletInvokerInterceptor since
we can get access to the portlet application class loader there so that we don't need to deploy the event classes separately on the consumer anymore.
- NetUnity producer event test portlets should now work properly as well.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/PayloadUtils.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/PayloadUtils.java 2010-10-21 00:06:10 UTC (rev 4749)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/PayloadUtils.java 2010-10-21 00:14:38 UTC (rev 4750)
@@ -24,7 +24,6 @@
package org.gatein.wsrp.payload;
import org.gatein.common.util.ParameterValidation;
-import org.gatein.pc.api.info.EventInfo;
import org.gatein.wsrp.WSRPTypeFactory;
import org.oasis.wsrp.v2.Event;
import org.oasis.wsrp.v2.EventPayload;
@@ -36,7 +35,6 @@
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.Serializable;
@@ -50,7 +48,6 @@
public class PayloadUtils
{
private final static Map<String, XSDTypeConverter> typeToConverters = new HashMap<String, XSDTypeConverter>(19);
- private final static Map<QName, XSDTypeConverter> nameToConverters = new HashMap<QName, XSDTypeConverter>(5);
private final static Map<Class, XSDTypeConverter> classToConverters = new HashMap<Class, XSDTypeConverter>(19);
static
@@ -70,9 +67,8 @@
}
}
- public static Serializable getPayloadAsSerializable(Event event, EventInfo eventInfo)
+ public static Serializable getPayloadAsSerializable(Event event)
{
- // GTNWSRP-49
EventPayload payload = event.getPayload();
if (payload == null)
{
@@ -98,39 +94,25 @@
{
Element element = (Element)any;
QName type = event.getType();
- String typeName = type.getLocalPart();
- if (XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(type.getNamespaceURI()))
+ if (type != null)
{
- // if we want a default simple datatype, convert it directly
- XSDTypeConverter converter = typeToConverters.get(typeName);
- if (converter == null)
- {
- throw new IllegalArgumentException("Don't know how to deal with standard type: " + type);
- }
+ String typeName = type.getLocalPart();
- // record which converter was used so that we can use it when it's time to marshall it back to XML
- nameToConverters.put(event.getName(), converter);
-
- return converter.parseFromXML(element.getTextContent());
- }
- else
- {
- // attempt to load the payload as a java class whose name is the type local part
- try
+ if (XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(type.getNamespaceURI()))
{
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- Class<? extends Serializable> clazz = loader.loadClass(typeName).asSubclass(Serializable.class);
- JAXBContext jaxbContext = JAXBContext.newInstance(clazz);
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
- JAXBElement result = unmarshaller.unmarshal(element, clazz);
- return (Serializable)result.getValue();
+ // if we want a default simple datatype, convert it directly
+ XSDTypeConverter converter = typeToConverters.get(typeName);
+ if (converter == null)
+ {
+ throw new IllegalArgumentException("Don't know how to deal with standard type: " + type);
+ }
+
+ return new SerializableSimplePayload(element, converter.parseFromXML(element.getTextContent()), converter);
}
- catch (Exception e)
- {
- throw new IllegalArgumentException("Couldn't unmarshall element " + element + " with expected type " + event, e);
- }
}
+
+ return new SerializablePayload(element);
}
}
@@ -141,37 +123,26 @@
SerializableNamedStringArray stringArray = (SerializableNamedStringArray)payload;
return WSRPTypeFactory.createEventPayloadAsNamedString(stringArray.toNamedStringArray());
}
+ else if (payload instanceof SerializablePayload)
+ {
+ if (payload instanceof SerializableSimplePayload)
+ {
+ eventNeedingType.setType(((SerializableSimplePayload)payload).getConverter().getXSDType());
+ }
+ return WSRPTypeFactory.createEventPayloadAsAny(((SerializablePayload)payload).getElement());
+ }
else
{
- // todo: complete GTNWSRP-49
- QName name = eventNeedingType.getName();
-
- // we will use the payload class name as type for serialiation if we can't find something better...
Class payloadClass = payload.getClass();
- QName type = new QName(payloadClass.getName());
-
- // first, try to get a converter from the event name and use the converter type
- XSDTypeConverter converter = nameToConverters.get(name);
+ // try to get a converter from the payload class to assert a simple XSD type if possible
+ XSDTypeConverter converter = classToConverters.get(payloadClass);
if (converter != null)
{
- // remove from map to avoid memory leak
- nameToConverters.remove(name);
-
- type = converter.getXSDType();
+ eventNeedingType.setType(converter.getXSDType());
}
- else
- {
- // otherwise, try to get a converter from the payload class
- converter = classToConverters.get(payloadClass);
- if (converter != null)
- {
- type = converter.getXSDType();
- }
- }
-
- // else, use the class name as type for the serialization
- eventNeedingType.setType(type);
+ // Marshall payload to XML
+ QName name = eventNeedingType.getName();
try
{
JAXBContext context = JAXBContext.newInstance(payloadClass);
@@ -186,7 +157,7 @@
}
catch (Exception e)
{
- throw new IllegalArgumentException("Couldn't marshall payload " + payload + " with expected type " + type, e);
+ throw new IllegalArgumentException("Couldn't marshall payload " + payload, e);
}
}
}
Added: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializablePayload.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializablePayload.java (rev 0)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializablePayload.java 2010-10-21 00:14:38 UTC (rev 4750)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.payload;
+
+import org.w3c.dom.Element;
+
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class SerializablePayload implements Serializable
+{
+ protected final Element element;
+
+ public SerializablePayload(Element element)
+ {
+ this.element = element;
+ }
+
+ public Element getElement()
+ {
+ return element;
+ }
+}
Added: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializableSimplePayload.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializableSimplePayload.java (rev 0)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializableSimplePayload.java 2010-10-21 00:14:38 UTC (rev 4750)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.payload;
+
+import org.w3c.dom.Element;
+
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class SerializableSimplePayload extends SerializablePayload
+{
+ private final Serializable payload;
+ private final XSDTypeConverter converter;
+
+ public SerializableSimplePayload(Element element, Serializable payload, XSDTypeConverter converter)
+ {
+ super(element);
+ this.payload = payload;
+ this.converter = converter;
+ }
+
+ public Serializable getPayload()
+ {
+ return payload;
+ }
+
+ public XSDTypeConverter getConverter()
+ {
+ return converter;
+ }
+}
Added: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/WSRPEventPayloadInterceptor.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/WSRPEventPayloadInterceptor.java (rev 0)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/WSRPEventPayloadInterceptor.java 2010-10-21 00:14:38 UTC (rev 4750)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.payload;
+
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.info.EventInfo;
+import org.gatein.pc.api.info.EventingInfo;
+import org.gatein.pc.api.info.PortletInfo;
+import org.gatein.pc.api.invocation.EventInvocation;
+import org.gatein.pc.api.invocation.PortletInvocation;
+import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.pc.portlet.PortletInvokerInterceptor;
+import org.gatein.pc.portlet.container.ContainerPortletInvoker;
+import org.gatein.pc.portlet.container.PortletApplication;
+import org.gatein.pc.portlet.container.PortletApplicationContext;
+import org.gatein.pc.portlet.container.PortletContainer;
+import org.gatein.pc.portlet.impl.info.ContainerTypeInfo;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.namespace.QName;
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class WSRPEventPayloadInterceptor extends PortletInvokerInterceptor
+{
+ /** . */
+ private final static Logger log = LoggerFactory.getLogger(WSRPEventPayloadInterceptor.class);
+
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
+ {
+ if (invocation instanceof EventInvocation)
+ {
+ EventInvocation eventInvocation = (EventInvocation)invocation;
+
+ Serializable srcPayload = eventInvocation.getPayload();
+
+ 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)
+ {
+ dstPayload = ((SerializableSimplePayload)srcPayload).getPayload();
+ }
+ else
+ {
+ SerializablePayload scp = (SerializablePayload)srcPayload;
+
+ try
+ {
+ Class<? extends Serializable> clazz = loader.loadClass(dstPayloadClass.getName()).asSubclass(Serializable.class);
+ JAXBContext jaxbContext = JAXBContext.newInstance(clazz);
+ Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+ JAXBElement<? extends Serializable> result = unmarshaller.unmarshal(scp.getElement(), clazz);
+
+ dstPayload = result.getValue();
+ }
+ catch (Exception e)
+ {
+ throw new PortletInvokerException("Couldn't unmarshall event from payload!", e);
+ }
+ }
+ }
+ else
+ {
+ if (trace)
+ {
+ log.trace("No type declared for event " + eventName + " declared by the portlet meta data " + containerId);
+ }
+ }
+ }
+
+ }
+
+ // Set payload
+ eventInvocation.setPayload(dstPayload);
+
+ //
+ try
+ {
+ return super.invoke(invocation);
+ }
+ finally
+ {
+ eventInvocation.setPayload(srcPayload);
+ }
+ }
+ else
+ {
+ return super.invoke(invocation);
+ }
+ }
+}
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java 2010-10-21 00:06:10 UTC (rev 4749)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java 2010-10-21 00:14:38 UTC (rev 4750)
@@ -26,7 +26,6 @@
import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.OpaqueStateString;
import org.gatein.pc.api.StateEvent;
-import org.gatein.pc.api.info.EventInfo;
import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.invocation.response.UpdateNavigationalStateResponse;
import org.gatein.pc.api.spi.InstanceContext;
@@ -97,12 +96,11 @@
{
for (Event event : events)
{
- EventInfo eventInfo = consumer.getProducerInfo().getInfoForEvent(event.getName());
Serializable payloadAsSerializable = null;
boolean failedPayload = false;
try
{
- payloadAsSerializable = PayloadUtils.getPayloadAsSerializable(event, eventInfo);
+ payloadAsSerializable = PayloadUtils.getPayloadAsSerializable(event);
}
catch (Exception e)
{
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/EventRequestProcessor.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/EventRequestProcessor.java 2010-10-21 00:06:10 UTC (rev 4749)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/EventRequestProcessor.java 2010-10-21 00:14:38 UTC (rev 4750)
@@ -149,7 +149,7 @@
Event event = events.get(0);
eventInvocation.setName(event.getName());
- eventInvocation.setPayload(PayloadUtils.getPayloadAsSerializable(event, null));
+ eventInvocation.setPayload(PayloadUtils.getPayloadAsSerializable(event));
return eventInvocation;
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-10-21 00:06:10 UTC (rev 4749)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-10-21 00:14:38 UTC (rev 4750)
@@ -30,6 +30,7 @@
import org.gatein.wsrp.WSRPRenderURL;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.payload.PayloadUtils;
+import org.gatein.wsrp.payload.SerializableSimplePayload;
import org.gatein.wsrp.producer.WSRPProducerBaseTest;
import org.gatein.wsrp.servlet.ServletAccess;
import org.gatein.wsrp.test.ExtendedAssert;
@@ -68,6 +69,7 @@
import org.oasis.wsrp.v2.UpdateResponse;
import javax.xml.namespace.QName;
+import java.io.Serializable;
import java.rmi.RemoteException;
import java.util.List;
import java.util.Locale;
@@ -843,8 +845,11 @@
Event event = events.get(0);
assertEquals(new QName("urn:jboss:gatein:samples:event", "eventsample"), event.getName());
assertEquals(WSRPConstants.XSD_STRING, event.getType());
- assertEquals("param-value", PayloadUtils.getPayloadAsSerializable(event, null));
+ Serializable serializable = PayloadUtils.getPayloadAsSerializable(event);
+ assertTrue(serializable instanceof SerializableSimplePayload);
+ assertEquals("param-value", ((SerializableSimplePayload)serializable).getPayload());
+
// send event
HandleEvents handleEvents = WSRPTypeFactory.createHandleEvents(null,
WSRPTypeFactory.createPortletContext(consumerHandle), createDefaultRuntimeContext(), null,
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/producer-sar/portlet-container.war/WEB-INF/jboss-beans.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/producer-sar/portlet-container.war/WEB-INF/jboss-beans.xml 2010-10-21 00:06:10 UTC (rev 4749)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/producer-sar/portlet-container.war/WEB-INF/jboss-beans.xml 2010-10-21 00:14:38 UTC (rev 4750)
@@ -1,32 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2010, 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.
+ -->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<bean name="PortletApplicationDeployer" class="org.gatein.pc.mc.PortletApplicationDeployer">
<alias>PortletApplicationRegistry</alias>
- <property name="servletContainerFactory"><inject bean="ServletContainerFactory"/></property>
- <property name="containerPortletInvoker"><inject bean="ContainerPortletInvoker"/></property>
+ <property name="servletContainerFactory">
+ <inject bean="ServletContainerFactory"/>
+ </property>
+ <property name="containerPortletInvoker">
+ <inject bean="ContainerPortletInvoker"/>
+ </property>
</bean>
<!-- The ServletContainerFactory -->
@@ -42,11 +46,14 @@
</bean>
<!-- The producer persistence manager -->
- <bean name="ProducerPersistenceManager" class="org.gatein.pc.portlet.impl.state.producer.PortletStatePersistenceManagerService"/>
+ <bean name="ProducerPersistenceManager"
+ class="org.gatein.pc.portlet.impl.state.producer.PortletStatePersistenceManagerService"/>
<!-- The producer state management policy -->
<bean name="ProducerStateManagementPolicy" class="org.gatein.pc.portlet.impl.state.StateManagementPolicyService">
- <property name="persistLocally"><value>true</value></property>
+ <property name="persistLocally">
+ <value>true</value>
+ </property>
</bean>
<!-- The producer state converter -->
@@ -54,51 +61,86 @@
<!-- The consumer portlet invoker -->
<bean name="ConsumerPortletInvoker" class="org.gatein.pc.portlet.PortletInvokerInterceptor">
- <property name="next"><inject bean="ConsumerCacheInterceptor"/></property>
+ <property name="next">
+ <inject bean="ConsumerCacheInterceptor"/>
+ </property>
</bean>
<bean name="ConsumerCacheInterceptor" class="org.gatein.pc.portlet.aspects.ConsumerCacheInterceptor">
- <property name="next"><inject bean="PortletCustomizationInterceptor"/></property>
+ <property name="next">
+ <inject bean="PortletCustomizationInterceptor"/>
+ </property>
</bean>
<bean name="PortletCustomizationInterceptor" class="org.gatein.pc.portlet.aspects.PortletCustomizationInterceptor">
- <property name="next"><inject bean="ProducerPortletInvoker"/></property>
+ <property name="next">
+ <inject bean="ProducerPortletInvoker"/>
+ </property>
</bean>
<!-- The producer portlet invoker -->
<bean name="ProducerPortletInvoker" class="org.gatein.pc.portlet.state.producer.ProducerPortletInvoker">
- <property name="next"><inject bean="ContainerPortletInvoker"/></property>
- <property name="persistenceManager"><inject bean="ProducerPersistenceManager"/></property>
- <property name="stateManagementPolicy"><inject bean="ProducerStateManagementPolicy"/></property>
- <property name="stateConverter"><inject bean="ProducerStateConverter"/></property>
+ <property name="next">
+ <inject bean="ContainerPortletInvoker"/>
+ </property>
+ <property name="persistenceManager">
+ <inject bean="ProducerPersistenceManager"/>
+ </property>
+ <property name="stateManagementPolicy">
+ <inject bean="ProducerStateManagementPolicy"/>
+ </property>
+ <property name="stateConverter">
+ <inject bean="ProducerStateConverter"/>
+ </property>
</bean>
<!-- The portlet container invoker -->
<bean name="ContainerPortletInvoker" class="org.gatein.pc.portlet.container.ContainerPortletInvoker">
- <property name="next"><inject bean="ValveInterceptor"/></property>
+ <property name="next">
+ <inject bean="ValveInterceptor"/>
+ </property>
</bean>
<!-- Container stack -->
<bean name="ValveInterceptor" class="org.gatein.pc.portlet.aspects.ValveInterceptor">
- <property name="portletApplicationRegistry"><inject bean="PortletApplicationRegistry" state="Instantiated"/></property>
- <property name="next"><inject bean="SecureTransportInterceptor"/></property>
+ <property name="portletApplicationRegistry">
+ <inject bean="PortletApplicationRegistry" state="Instantiated"/>
+ </property>
+ <property name="next">
+ <inject bean="SecureTransportInterceptor"/>
+ </property>
</bean>
<bean name="SecureTransportInterceptor" class="org.gatein.pc.portlet.aspects.SecureTransportInterceptor">
- <property name="next"><inject bean="ContextDispatcherInterceptor"/></property>
+ <property name="next">
+ <inject bean="ContextDispatcherInterceptor"/>
+ </property>
</bean>
<bean name="ContextDispatcherInterceptor" class="org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor">
- <property name="servletContainerFactory"><inject bean="ServletContainerFactory"/></property>
- <property name="next"><inject bean="ProducerCacheInterceptor"/></property>
+ <property name="servletContainerFactory">
+ <inject bean="ServletContainerFactory"/>
+ </property>
+ <property name="next">
+ <inject bean="ProducerCacheInterceptor"/>
+ </property>
</bean>
<bean name="ProducerCacheInterceptor" class="org.gatein.pc.portlet.aspects.ProducerCacheInterceptor">
- <property name="next"><inject bean="CCPPInterceptor"/></property>
+ <property name="next">
+ <inject bean="CCPPInterceptor"/>
+ </property>
</bean>
<bean name="CCPPInterceptor" class="org.gatein.pc.portlet.aspects.CCPPInterceptor">
- <property name="next"><inject bean="RequestAttributeConversationInterceptor"/></property>
+ <property name="next">
+ <inject bean="RequestAttributeConversationInterceptor"/>
+ </property>
</bean>
- <bean name="RequestAttributeConversationInterceptor" class="org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor">
- <property name="next"><inject bean="EventPayloadInterceptor"/></property>
+ <bean name="RequestAttributeConversationInterceptor"
+ class="org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor">
+ <property name="next">
+ <inject bean="EventPayloadInterceptor"/>
+ </property>
</bean>
- <bean name="EventPayloadInterceptor" class="org.gatein.pc.portlet.aspects.EventPayloadInterceptor">
- <property name="next"><inject bean="PortletContainerDispatcher"/></property>
+ <bean name="EventPayloadInterceptor" class="org.gatein.wsrp.payload.WSRPEventPayloadInterceptor">
+ <property name="next">
+ <inject bean="PortletContainerDispatcher"/>
+ </property>
</bean>
<bean name="PortletContainerDispatcher" class="org.gatein.pc.portlet.container.ContainerPortletDispatcher">
</bean>
14 years, 2 months
gatein SVN: r4749 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-20 20:06:10 -0400 (Wed, 20 Oct 2010)
New Revision: 4749
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java
Log:
- GTNWSRP-108: change error handling behavior so that events with no payloads work again.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java 2010-10-20 19:05:57 UTC (rev 4748)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/NavigationalStateUpdatingHandler.java 2010-10-21 00:06:10 UTC (rev 4749)
@@ -99,16 +99,18 @@
{
EventInfo eventInfo = consumer.getProducerInfo().getInfoForEvent(event.getName());
Serializable payloadAsSerializable = null;
+ boolean failedPayload = false;
try
{
payloadAsSerializable = PayloadUtils.getPayloadAsSerializable(event, eventInfo);
}
catch (Exception e)
{
+ failedPayload = true;
log.info("Couldn't handle payload for event " + event.getName() + ". Will ignore it.", e);
}
- if (payloadAsSerializable != null)
+ if (!failedPayload)
{
result.queueEvent(new UpdateNavigationalStateResponse.Event(event.getName(), payloadAsSerializable));
}
14 years, 2 months
gatein SVN: r4748 - components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-10-20 15:05:57 -0400 (Wed, 20 Oct 2010)
New Revision: 4748
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java
Log:
GTNWSRP-105: don't try and process empty markup for rewriting. URLTools.replaceURLsBy doesn't support passing empty or null strings.
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java 2010-10-20 14:08:46 UTC (rev 4747)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java 2010-10-20 19:05:57 UTC (rev 4748)
@@ -65,8 +65,11 @@
protected String processFragmentString(String renderString)
{
// String result = renderString.replaceAll(namespace, WSRPRewritingConstants.WSRP_REWRITE);
-
- return URLTools.replaceURLsBy(renderString, new WSRPUtils.AbsoluteURLReplacementGenerator(ServletAccess.getRequest()));
+ if (renderString != null && !renderString.isEmpty())
+ {
+ return URLTools.replaceURLsBy(renderString, new WSRPUtils.AbsoluteURLReplacementGenerator(ServletAccess.getRequest()));
+ }
+ return renderString;
}
public Response processResponse(PortletInvocationResponse response)
14 years, 2 months
gatein SVN: r4747 - epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-20 10:08:46 -0400 (Wed, 20 Oct 2010)
New Revision: 4747
Modified:
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
Log:
JBEPP-556: Performance Improvements
GTNPORTAL-1575: Create a dedicated configuration section for MOP cache
Modified: epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2010-10-20 14:03:05 UTC (rev 4746)
+++ epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2010-10-20 14:08:46 UTC (rev 4747)
@@ -277,6 +277,29 @@
<external-component-plugins>
<target-component>org.exoplatform.services.cache.CacheService</target-component>
+ <component-plugin>
+ <name>addExoCacheConfig</name>
+ <set-method>addExoCacheConfig</set-method>
+ <type>org.exoplatform.services.cache.ExoCacheConfigPlugin</type>
+ <description>add Exo Cache Config</description>
+ <init-params>
+ <object-param>
+ <name>cache.config.MOPSessionManager</name>
+ <description>The JBoss Cache configuration for the MOP session Manager</description>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field name="name">
+ <string>MOPSessionManager</string>
+ </field>
+ <field name="maxSize">
+ <int>5000</int>
+ </field>
+ <field name="liveTime">
+ <long>600</long>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
<component-plugin profiles="cluster">
<name>addExoCacheConfig</name>
<set-method>addExoCacheConfig</set-method>
14 years, 2 months
gatein SVN: r4746 - epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/common.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-20 10:03:05 -0400 (Wed, 20 Oct 2010)
New Revision: 4746
Modified:
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
Log:
JBEPP-556: Performance Improvements
GTNPORTAL-1574: Use local configuration template for local JBoss cache config
Modified: epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2010-10-20 14:00:18 UTC (rev 4745)
+++ epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2010-10-20 14:03:05 UTC (rev 4746)
@@ -127,7 +127,7 @@
<init-params>
<value-param>
<name>cache.config.template</name>
- <value>classpath:/conf/jbosscache/cluster/config.xml</value>
+ <value>classpath:/conf/jbosscache/local/config.xml</value>
</value-param>
<value-param profiles="cluster">
<name>cache.config.template</name>
14 years, 2 months