I have an application working in a cluster environment (two nodes) with JBoss
4.0.4.
This app haves a shared object (a bean) in HAJNDI that works as follow:
The master node sets some values (monitoring values) in this bean and as HAJNDI
works, this object will be gathered by the other replicated application in
cluster. If I want to refresh monitor values from master node, I can do it (I
mean, all values are set to zero and the other replicated app in cluster can
see refreshed values)
But, JBoss is working in a rare way if I do this from the other node or I don't
understand very well how HAJNDI works.
Because, if this process (set all values to zero) is made in the other node, I
can see refreshed values in this node only and I can't see refreshed values
from the master node.
The question is...why ONLY from the master node I can refresh bean values in
HAJNDI? Why not from the other node in cluster?
I have a object (a bean called "transactionInfoBean") published in a HAJNDI
tree with this code:
...
p.load(new FileInputStream(new File(path + "/hajndi.properties")));
...
try {
lookup.bind("cluster/beans/" + "transactionInfoBean", transactionInfoBean);
} catch (NameAlreadyBoundException e) {
lookup.rebind("cluster/beans/" + "transactionInfoBean", transactionInfoBean);
}
...
perform some works...
// obtains the remote bean and invokes its refreshStoreCounters() method.
transactionInfoBean = (TransactionInfoBean)
lookup.get("cluster/beans/transactionInfoBean");
transactionInfoBean.refreshStoresCounters(localStoreMonitors);
lookup.rebind("cluster/beans/transactionInfoBean",
transactionInfoBean);
hajndi.properties file content
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jnp.interfaces
java.naming.provider.url=localhost:1100
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060870#4060870
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060870
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user