Author: chris.laprun(a)jboss.com
Date: 2010-11-19 12:29:02 -0500 (Fri, 19 Nov 2010)
New Revision: 5183
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
Log:
- GTNWSRP-166: The FederatingPortletInvoker wasn't properly updated when a
producer's id was changed. Not sure how we never realized that before, kudos to Michal
for exposing the issue! :)
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2010-11-19
14:26:10 UTC (rev 5182)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2010-11-19
17:29:02 UTC (rev 5183)
@@ -252,7 +252,15 @@
if (oldId != null)
{
remove(getConsumer(oldId));
- createConsumerFrom(producerInfo);
+ WSRPConsumer consumer = createConsumerFrom(producerInfo);
+
+ // update the federating portlet invoker:
+ FederatedPortletInvoker invoker =
federatingPortletInvoker.getFederatedInvoker(oldId);
+ if (invoker != null)
+ {
+ federatingPortletInvoker.unregisterInvoker(oldId);
+ federatingPortletInvoker.registerInvoker(producerInfo.getId(), consumer);
+ }
}
}