[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [sca-assembly] some of our concerns with the eventing proposal
On Sep 9, 2009, at 11:40 PM, Danny van der Rijn wrote:
public class SomeProducerImpl implements .... { @Reference protected EventListener listener; public void doSomething(...) { // some processing.... Event event = //.... listener.onEvent(event); } } public class SomeConsumer1 implements EventListener { public void onEvent(Event event) { // some processing.... } } public class SomeConsumer2 implements EventListener { public void onEvent(Event event) { // some processing.... } } <composite name="ProducerComposite".....> <component name="SomeProducer"> <implementation.java class="foo.SomeProducerImpl"/> <reference name="listener"> <binding.jms> <destination name="someTopic" type="topic"/> </binding.jms> </reference> </component> </composite> <composite name="ConsumerComposite1".....> <component name="SomeConsumer1"> <implementation.java class="foo. SomeConsumer1"/> <service name="EventListener"> <binding.jms> <destination name="someTopic" type="topic"/> </binding.jms> </service> </component> </composite> <composite name="ConsumerComposite2".....> <component name="SomeConsumer1"> <implementation.java class="foo. SomeConsumer2"/> <service name="EventListener"> <binding.jms> <destination name="someTopic" type="topic"/> </binding.jms> </service> </component> </composite> Both the consumer components (and any other listener subscribed to the topic) will receive messages. Jim
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]