[gatein-commits] gatein SVN: r8651 - components/wsrp/branches/2.1.x/producer/src/main/java/org/gatein/registration/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Mar 28 07:26:46 EDT 2012
Author: chris.laprun at jboss.com
Date: 2012-03-28 07:26:45 -0400 (Wed, 28 Mar 2012)
New Revision: 8651
Modified:
components/wsrp/branches/2.1.x/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java
Log:
Bug 807626 / GTNWSRP-283 - Producer registration error when producer is set to not use registrations: registration used to track consumers when registration is not required on the producer wasn't added to the consumer that was just created resulting in improper state.
Modified: components/wsrp/branches/2.1.x/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java
===================================================================
--- components/wsrp/branches/2.1.x/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java 2012-03-28 08:23:52 UTC (rev 8650)
+++ components/wsrp/branches/2.1.x/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java 2012-03-28 11:26:45 UTC (rev 8651)
@@ -283,10 +283,10 @@
Consumer unregConsumer = getConsumerByIdentity(NON_REGISTERED_CONSUMER);
if (unregConsumer == null)
{
- unregConsumer = createConsumer(NON_REGISTERED_CONSUMER);
- Registration registration = addRegistrationTo(NON_REGISTERED_CONSUMER, new HashMap<QName, Object>(), null, false);
+ Registration registration = addRegistrationTo(NON_REGISTERED_CONSUMER, new HashMap<QName, Object>(), null, true);
registration.setStatus(RegistrationStatus.VALID);
- getPersistenceManager().saveChangesTo(unregConsumer);
+ getPersistenceManager().saveChangesTo(registration);
+ return registration;
}
//The unregistered consumer should only ever have one registration, return that
return unregConsumer.getRegistrations().iterator().next();
More information about the gatein-commits
mailing list