Author: thomas.heute(a)jboss.com
Date: 2010-04-14 04:40:48 -0400 (Wed, 14 Apr 2010)
New Revision: 2617
Modified:
portal/branches/EPP_5_0_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java
Log:
JBEPP-302: Can't edit id of consumer
Modified:
portal/branches/EPP_5_0_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java
===================================================================
---
portal/branches/EPP_5_0_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java 2010-04-14
08:20:48 UTC (rev 2616)
+++
portal/branches/EPP_5_0_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java 2010-04-14
08:40:48 UTC (rev 2617)
@@ -111,11 +111,14 @@
{
throw new IllegalArgumentException("Couldn't find ProducerInfoMapping
associated with key " + key);
}
+ String oldId = pim.getId();
+ String newId = producerInfo.getId();
pim.initFrom(producerInfo);
persister.closeSession(session, true);
- return null;
+ // if the consumer's id has changed, return the old one so that state can be
updated
+ return (oldId.equals(newId)) ? null : oldId;
}
@Override
Show replies by date