On 6/22/10 4:36 PM, Bobby Bissett wrote:
> On Jun 22, 2010, at 4:53 PM, Jerome Dochez wrote:
>> why can't it listen to config changes to the Clusters configuration
>> object ?
>
> Can it? We didn't know this existed.
>
> To be safe, are we talking about the
> org.jvnet.hk2.config.ConfigListener interface?
>
yes
and you can be automatically registered :
@Service
public class Foo implements ConfigListener {
@Inject Clusters clusters;
public void changed(PropertyChangeListener[] events) {
// something injected has changed...
}
}
In other words, implement the interface and you automatically get
notified when any of all config objects you injected changed. use
Event.getSource() to find out which one...
> Thanks,
> Bobby
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>