Author: chris.laprun(a)jboss.com
Date: 2010-10-16 12:38:46 -0400 (Sat, 16 Oct 2010)
New Revision: 4697
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
Log:
- GTNWSRP-94: refresh consumers which are marked as active but haven't been activated
when the consumers list is requested.
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-10-15
23:35:34 UTC (rev 4696)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2010-10-16
16:38:46 UTC (rev 4697)
@@ -431,7 +431,23 @@
protected Collection<WSRPConsumer> getConsumers()
{
- return consumers.values();
+ Collection<WSRPConsumer> consumerz = consumers.values();
+ for (WSRPConsumer consumer : consumerz)
+ {
+ if (consumer.getProducerInfo().isActive() && !consumer.isActive())
+ {
+ try
+ {
+ consumer.refresh(false);
+ }
+ catch (Exception e)
+ {
+ log.info("Couldn't activate consumer " +
consumer.getProducerId());
+ consumer.getProducerInfo().setActiveAndSave(false);
+ }
+ }
+ }
+ return consumerz;
}
protected Map<String, String> getKeyMappings()
Show replies by date