Author: chris.laprun(a)jboss.com
Date: 2012-03-28 07:29:22 -0400 (Wed, 28 Mar 2012)
New Revision: 8652
Modified:
components/wsrp/trunk/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/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java 2012-03-28
11:26:45 UTC (rev 8651)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java 2012-03-28
11:29:22 UTC (rev 8652)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2011, Red Hat Middleware, LLC, and individual
+ * Copyright 2012, 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.
@@ -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();
Show replies by date