[jboss-user] [Clustering/JBoss] - Deprecated DistributedState in Cluster API for JBossAS 5
jalxm
do-not-reply at jboss.com
Thu Jul 16 07:21:17 EDT 2009
I have code with DistributedState to update some data (my own metrics) for all members in cluster.
Now I see that DistributedState (seems DistributedState.DSListenerEx too) deprecated but I don't know how to replace my code.
Take a look..
HAPartition part = ...;
DistributedState distState = part.getDistributedStateService();
DistributedState.DSListenerEx listenerState = new DistributedState.DSListenerEx() {
/**
* {@inheritDoc}
*/
public void keyHasBeenRemoved(String category, Serializable key, Serializable value, boolean locally) {
// No-op.
}
/**
* {@inheritDoc}
*/
public void valueHasChanged(String category, Serializable key, Serializable value, boolean locally) {
// Some logic...
}
};
/* Register state listener. */
distState.registerDSListenerEx(CATEGORY, listenerState);
Every cluster node start thread with metrics update in loop
distState.set(CATEGORY, locNode.getJBossId(), localNodeMetrics);
Do you have any ideas how to replicate metrics for all nodes?
I see that CacheManager added in JBoss AS 5
Thanks,
Alex Magdenko
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244057#4244057
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244057
More information about the jboss-user
mailing list