On 12/13/06, RNobrega <[EMAIL PROTECTED]> wrote:

We've managed to come pretty far with servicemix
as it is, but still have some questions related to listeners:

1) One of our components is interested in doing something when
the container changes to STARTED state. We're using
container.setPropertyChangeListener(this). Is this ok? What if
there was a listener there before? It will be removed...

The propertyChangeListener is used by the associated mbeans
to fire notifications when a property value changes.
I'd rather implement a new set of events if needed.
If you use 3.1-SNAPSHOT, i recently added an additional
property on the jbi container to start additional services, which follow
the same lifecycle as the container, though they are started before
some other native services (registry, broker...)


2) Another object operates on a MessageExchange, and wants
to be notified (later) of what happened to the exchange, namely
whether it failed or not. I was looking for add***Listener in either
MessageExchangeImpl or ExchangePacket, but it's not there. I'm not
even sure of whether this can be done (what if the exchange moved to
another jvm in the mean time?) but wanted to ask anyway

Isn't the ExchangeListener on the container sufficient ?
You should be able to intercept all exchanges send / received by
components.

What's you exact use case for both ? It would help finding a solution.


Thanks,

Ricardo
--
View this message in context: 
http://www.nabble.com/listeners-in-container-and-MessageExchange-tf2815007s12049.html#a7856014
Sent from the ServiceMix - User mailing list archive at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to