Saturday, 17 August 2013

How to share some property between servers in a Weblogic cluster?

How to share some property between servers in a Weblogic cluster?

How can I reliably share a single property value between multiple servers
in a Weblogic cluster -- which gets sets by one of the servers (the first
one to try and access it).
Imagine it is like a static variable across the whole cluster, and the
first server to access the variable gets to set it's value and that value
is seen by every other server in the cluster.
I had thought the JNDI would be appropriate for this, as I read that the
JNDI in a clustered environment ensures the object is shared amongst the
cluster. So I set a string object in the cluster under a JNDI name and
expected other servers who tried to bind the same name would get a Name
Already Bound exception and thus know to use the already bound value from
another server. But its not working. Each server is setting their own
value in the JNDI with seemingly nothing to suggest they are accessing the
same JNDI.

No comments:

Post a Comment